hoffstadt / hoffstadt/DearPyGui

Application crashes when file_dialog path encounters characters like æ ø å

Open
#2,057 2 comments 1 reaction 0 assignees View on GitHub
state: pending type: bug
Dominant language
C++
Stars
15.6k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

## Version of Dear PyGui

Version: 1.8.0
Operating System: Windows 10

## My Issue/Question

Application crashes if you have a character like æ, ø, å in your path when you press OK or CANCEL.

## To Reproduce

Steps to reproduce the behavior:
1. open a file_dialog
2. Navigate to a path with a character like ø, æ or å
3. Click on either ok or cancel
4. Application crashes

## Expected behavior

Executes either callback or cancel_callback.

## Standalone, minimal, complete and verifiable example

```python
import dearpygui.dearpygui as dpg
import os

new_folder_name = "new_folder_with_øæå"
current_dir = os.getcwd()
new_folder_path = os.path.join(current_dir, new_folder_name)
if (os.path.exists(new_folder_path) == False):
os.makedirs(new_folder_path)

dpg.create_context()

def callback(sender, app_data):
print('OK was clicked.')

def cancel_callback(sender, app_data):
print('Cancel was clicked.')
print("Sender: ", sender)
print("App Data: ", app_data)

width, height = 600,600
dpg.add_file_dialog(
directory_selector=True, show=False, callback=callback, tag="dialog",
cancel_callback=cancel_callback, width=400 ,height=400 )

dpg.show_item("dialog")

dpg.create_viewport(title='File Name', width=width, height=height)

dpg.setup_dearpygui()
dpg.show_viewport()

dpg.start_dearpygui()
dpg.destroy_context()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.