Blender's search in data-blocks is case-sansitive in cyrilic letters #43221

Open
opened 2015-01-12 10:19:42 +01:00 by Michael Soluyanov · 6 comments

System Information
Ubuntu 14.04

Blender Version
Broken: 2.73

Short description of error
Supporting of Utf-8 characters chars in names of objects and data-blocks are not completely done. While searching, uppercase and lowercase letters in the Cyrillic alphabet are considered as different letters.

Exact steps for others to reproduce the error
Here is the test file casetest.blend

Снимок_экрана_из_2015-01-12_12:14:16.png

Снимок_экрана_из_2015-01-12_12:14:30.png

**System Information** Ubuntu 14.04 **Blender Version** Broken: 2.73 **Short description of error** Supporting of Utf-8 characters chars in names of objects and data-blocks are not completely done. While searching, uppercase and lowercase letters in the Cyrillic alphabet are considered as different letters. **Exact steps for others to reproduce the error** Here is the test file [casetest.blend](https://archive.blender.org/developer/F136759/casetest.blend) ![Снимок_экрана_из_2015-01-12_12:14:16.png](https://archive.blender.org/developer/F136755/Снимок_экрана_из_2015-01-12_12_14_16.png) ![Снимок_экрана_из_2015-01-12_12:14:30.png](https://archive.blender.org/developer/F136757/Снимок_экрана_из_2015-01-12_12_14_30.png)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @crantisz

Added subscriber: @crantisz

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This is definetly missing in our current code, but is a part of a bigger issue - that we have many uses of.

  • BLI_strcasecmp
  • BLI_strcasestr
  • BLI_strncasecmp
  • BLI_natstrcmp

And none of them handle unicode characters.

Suggest solution:


Use Python's unicode library as we do already for text_check_identifier_unicode, text_check_identifier_nodigit_unicode.
This is very low level and not related to the rest of the Python runtime (no GIL or py-threading issues)

Then wrap Py_UNICODE_TOLOWER as a bad-level call in BLI_string_utf8.h and have utf8 versions of the functions above.

This is a longer term TODO though (http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#General_todo_items)

This is definetly missing in our current code, but is a part of a bigger issue - that we have many uses of. - `BLI_strcasecmp` - `BLI_strcasestr` - `BLI_strncasecmp` - `BLI_natstrcmp` And none of them handle unicode characters. Suggest solution: ---- Use Python's unicode library as we do already for `text_check_identifier_unicode`, `text_check_identifier_nodigit_unicode`. This is very low level and not related to the rest of the Python runtime (no GIL or py-threading issues) Then wrap `Py_UNICODE_TOLOWER` as a bad-level call in `BLI_string_utf8.h` and have utf8 versions of the functions above. This is a longer term TODO though (http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface#General_todo_items)

Added subscriber: @Vyach

Added subscriber: @Vyach

poke
Old but still actual

poke Old but still actual
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#43221
No description provided.