Unicode Block Not Working on Windows #71273
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#71273
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10
Blender Version
Broken: 2.80 Release
Worked: Never
Short description of error
Text objects do not display Old Turkic Unicode block (Old Turkic, U+10C00 - U+10C4F) when using Segoe UI Historic or Google Noto Sans Old Turkic.
Exact steps for others to reproduce the error
Open:
font.blend
Or follow the steps:
ttf
orotf
version of either Segoe UI Historic or Google Noto Sans Old TurkicExpected result (obtained on Linux):
Developer Notes
The code assumes
wchar_t
is 32 bit, which is not the case on Windows. See comments for more investigation details.Added subscriber: @mehmetoguzderin
Added subscribers: @mont29, @mano-wii
Analyzing the code I realize that, at least in windows, the supported character encoding is utf-16.
u'\U00010c45'
is from a 32-bit hex value that is only supported by utf-32.A possible solution would be to change the value of the built-in type
wchar_t
to 4-byte.If I'm not mistaken this is the size of
wchar_t
in linux.I think this is a known limitation.
@mont29, what do you think?
Added subscriber: @LazyDodo
sizeof(wchar_t)
is implementation dependent and cannot be changed for some implementations, C11 addedchar16_t
andchar32_t
types for if you have size requirements.Yeahhh this is a mess....
Debugged a little into this, the input to
vfont_to_curve
is correctly UTF8, however, it then feeds this toBLI_strncpy_wchar_from_utf8
which internally assumes wchar_t is 32 bits which is decisively not the case on windows (16 bits there, cannot be changed. specs say implementation is free to do whatever with wchar_t) so the upper 16 bits get lost and you and up with the wrong codepoint.Only way to fix this is to replace the parts of the codebase where the assumption is made that
wchar_t
is 32 bit to useuint32_t
instead (I really would have preferredchar32_t
but msvc does not support this type in c mode)Added subscriber: @dfelinto
Here (Ubuntu Linux, official Blender 2.80) it works fine:
font.blend
wchar_t is 32 bit on gcc, so yeah you wouldn't see the issue there.
Unicode Block Not Workingto Unicode Block Not Working on WindowsThis issue was referenced by
177dfc6384
Changed status from 'Open' to: 'Resolved'
Added subscriber: @MilanJaros
I have problem with building of this patch on Linux (CentOS) with GCC/4.9 or GCC/7.1 with blender_lite.cmake. I have got the error message: "uchar.h: No such file or directory" in BLI_sys_types.h and in wcwidth.h. After fix it I have got the next error message: "unknown type name size_t" in wcwidth.h and wcwidth.c. After changes on my site in BLI_sys_types.h (uchar.h -> add typedef like for macos), wcwidth.h (size_t -> unsigned long long int) and wcwidth.c (size_t -> unsigned long long int) it works fine.