You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@v-ein reply on discord
Okay so I digged in a bit and it turns out that for STB to support UTF-8, it needs to be built with the STBI_WINDOWS_UTF8 define. I've added -DSTBI_WINDOWS_UTF8 to the build config in my local copy of DPG, and it worked - load_image can now load images with non-ASCII paths.
Definitely go ahead and open a ticket on GitHub.
To Reproduce
@v-ein reply on discord
You can open a ticket on GitHub. I've just tried load_image on a non-ASCII path - doesn't work for me either, even though it should (it uses STB under the cover, which seems to be UTF-8 aware).
Expected behavior
viewport title will output mess code for non-ASCII characters output_frame filename will output mess code for non-ASCII characters load_image filename save_image filename file_dialog will show ????? for non-ASCII characters
will save or show non-ASCII correctly
Screenshots/Video
@v-ein reply on discord
You can open a ticket on GitHub. I've just tried load_image on a non-ASCII path - doesn't work for me either, even though it should (it uses STB under the cover, which seems to be UTF-8 aware).
Okay so I digged in a bit and it turns out that for STB to support UTF-8, it needs to be built with the STBI_WINDOWS_UTF8 define. I've added -DSTBI_WINDOWS_UTF8 to the build config in my local copy of DPG, and it worked - load_image can now load images with non-ASCII paths.
Definitely go ahead and open a ticket on GitHub.
Standalone, minimal, complete and verifiable example
importdearpygui.dearpyguiasdpgdpg.create_context()
dpg.create_viewport(tilte=non_ASCII_chars)
main_window_tag=dpg.generate_uuid()
withdpg.window(tag=main_window_tag):
image_file_name_with_non_ASCII=non_ASCII_chars+".png"#Use filename with non-ASCII characters on windowsprint (image_file_name_with_non_ASCII)
dpg.split_frame()
dpg.split_frame()
dpg.output_frame_buffer(file=image_file_name_with_non_ASCII)
dpg.split_frame()
dpg.split_frame()
dpg.file_dialog() #load paths with non-ASCII characters will show ???????dpg.load_image(file=image_file_name_with_non_ASCII) filenamecannotbenon-ASCIIcharactersdpg.save_image(file=image_file_name_with_non_ASCII) filenamecannotbenon-ASCIIcharactersdpg.set_primary_window(main_window_tag,True)
dpg.configure_item(main_window_tag,horizontal_scrollbar=True)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
The text was updated successfully, but these errors were encountered:
Version of Dear PyGui
Version: 1.11.1
Operating System: XXX (Windows 11)
My Issue/Question
@v-ein reply on discord
Okay so I digged in a bit and it turns out that for STB to support UTF-8, it needs to be built with the
STBI_WINDOWS_UTF8
define. I've added-DSTBI_WINDOWS_UTF8
to the build config in my local copy of DPG, and it worked -load_image
can now load images with non-ASCII paths.Definitely go ahead and open a ticket on GitHub.
To Reproduce
@v-ein reply on discord
You can open a ticket on GitHub. I've just tried
load_image
on a non-ASCII path - doesn't work for me either, even though it should (it uses STB under the cover, which seems to be UTF-8 aware).Expected behavior
viewport
title will output mess code for non-ASCII charactersoutput_frame
filename will output mess code for non-ASCII charactersload_image
filenamesave_image
filenamefile_dialog
will show ????? for non-ASCII characterswill save or show non-ASCII correctly
Screenshots/Video
@v-ein reply on discord
You can open a ticket on GitHub. I've just tried
load_image
on a non-ASCII path - doesn't work for me either, even though it should (it uses STB under the cover, which seems to be UTF-8 aware).Okay so I digged in a bit and it turns out that for STB to support UTF-8, it needs to be built with the
STBI_WINDOWS_UTF8
define. I've added-DSTBI_WINDOWS_UTF8
to the build config in my local copy of DPG, and it worked -load_image
can now load images with non-ASCII paths.Definitely go ahead and open a ticket on GitHub.
Standalone, minimal, complete and verifiable example
The text was updated successfully, but these errors were encountered: