View Issue Details

IDProjectCategoryView StatusLast Update
0037063LazarusLCLpublic2020-06-01 16:16
ReporterVitaly V Gorbukov Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
PlatformWindowsOSWindows 10 
Product Version2.0.8 
Summary0037063: Error on TOpenDialog.execute when username is in Cyrillic
DescriptionWhen TOpenDialog is opened, an error about not being able to access "Desktop" folder is shown, even before selecting any file or making any click in the dialog.

Note that the username in Windows 10 is in Cyrillic in this case.

All seems to work OK if TOpenDialog's Options contains oldStyleDialog.

--

При запуске OpenDialog.execute возникает ошибка доступа к "рабочему столу", ошибка возникает при открытии окна диалога, то есть еще до выбора файла и вообще любого клика в диалоге..

вместо папки рабочий стол в поле слева от списка файлов Desktop вот эта папка и не открывается
дополнительно, имя пользователя в Win10 написано русскими буквами

раньше эта ошибка эпизодически возникала в laz1.8.4 - но пропала после переустановки...
в данной же сборке она возникает постоянно...

к слову если в Options компонента выбрать oldStyleDialog (родом из Win3.1 что ли... или 95) - то ошибки нет...

Steps To Reproduceкод на скриншоте генерит ошибку...
еще раз повторюсь - имя пользователя в Win10 написано русскими буквами...
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

duplicate of 0036193 new win32 error with TOpenDialog.Execute 

Activities

Vitaly V Gorbukov

2020-05-13 16:41

reporter  

Bart Broersma

2020-05-13 16:44

developer   ~0122765

English please!

Maxim Ganetsky

2020-05-14 15:12

developer   ~0122791

Added English translation.

Vitaly V Gorbukov

2020-05-18 03:09

reporter   ~0122895

I’ll clarify the description: an error occurs in any file system dialog: Open \ Save Dialog, SelectDirectory ...

moreover, when recompiling old projects (where this error did not happen) - it appears ...

once again I draw attention to an incomprehensible Desktop folder, in the national settings of Windows10 it has the name "Рабочий стол" - this folder does not open from the dialog box (again an error occurs)

Vitaly V Gorbukov

2020-05-18 03:27

reporter   ~0122897

I now installed the Win64 version - the error when opening remained consistent.

CudaText man

2020-06-01 16:16

reporter   ~0123164

Found suspicious place in LCL

lazarus/lcl/interfaces/win32/win32wsdialogs.pp

    FolderName := UTF16ToUTF8(DialogRec^.UnicodeFolderName);
    FileNames := UTF16ToUTF8(DialogRec^.UnicodeFileNames);
    if FolderName='' then
    begin
      // On Windows 7, the SendMessageW(GetParent(Wnd), CDM_GETFOLDERPATH, 0, LPARAM(nil))
      // at UpdateStorage might fail (see 0016797)
      // However, the valid directory is returned in OpenFile^.lpstrFile
      //
      // What was the reason not to use OpenFile^.lpstrFile, since it's list
      // of the selected files, without need of writting any callbacks!
      FolderName:=UTF16ToUTF8(PWidechar(OpenFile^.lpstrFile));
      // Check for DirectoryExistsUTF8(FolderName) is required, because Win 7
  
try to change/play here with encoding of FolderName var getting.

Issue History

Date Modified Username Field Change
2020-05-13 16:41 Vitaly V Gorbukov New Issue
2020-05-13 16:41 Vitaly V Gorbukov File Added: Screen Shot 13.05.2020 at 19.37.png
2020-05-13 16:41 Vitaly V Gorbukov File Added: Screen Shot 13.05.2020 at 19.41.png
2020-05-13 16:44 Bart Broersma Status new => feedback
2020-05-13 16:44 Bart Broersma LazTarget => -
2020-05-13 16:44 Bart Broersma Note Added: 0122765
2020-05-14 15:11 Maxim Ganetsky Category Compiler => LCL
2020-05-14 15:11 Maxim Ganetsky OS => Windows
2020-05-14 15:11 Maxim Ganetsky OS Version => 10
2020-05-14 15:11 Maxim Ganetsky Platform => Windows
2020-05-14 15:11 Maxim Ganetsky Summary ошибка при OpenDialog.execute => Error on TOpenDialog.execute when username is in Cyrillic
2020-05-14 15:11 Maxim Ganetsky Description Updated View Revisions
2020-05-14 15:11 Maxim Ganetsky Steps to Reproduce Updated View Revisions
2020-05-14 15:11 Maxim Ganetsky Widgetset Win32/Win64 => Win32/Win64
2020-05-14 15:12 Maxim Ganetsky Status feedback => new
2020-05-14 15:12 Maxim Ganetsky Widgetset Win32/Win64 => Win32/Win64
2020-05-14 15:12 Maxim Ganetsky Note Added: 0122791
2020-05-14 15:13 Maxim Ganetsky OS Windows => Windows 10
2020-05-14 15:13 Maxim Ganetsky Widgetset Win32/Win64 => Win32/Win64
2020-05-14 18:46 Bart Broersma Assigned To => Bart Broersma
2020-05-14 18:46 Bart Broersma Status new => resolved
2020-05-14 18:46 Bart Broersma Resolution open => duplicate
2020-05-14 18:46 Bart Broersma Widgetset Win32/Win64 => Win32/Win64
2020-05-14 18:46 Bart Broersma Relationship added duplicate of 0036193
2020-05-18 03:09 Vitaly V Gorbukov Note Added: 0122895
2020-05-18 03:27 Vitaly V Gorbukov Note Added: 0122897
2020-06-01 16:16 CudaText man Note Added: 0123164