File with German Umlaute -> Directory() ?
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
File with German Umlaute -> Directory() ?
hi,
i have a File with "ü" CHR(129) which ist a German "Umlaut"
i use UNICODE and DIRECTORY() to get Array for GRID
i did not notice this before unter harbour / HMG
i know this from Xbase++ that DIRETORY() under GUI will return ANSI .. how about HMG
i have a File with "ü" CHR(129) which ist a German "Umlaut"
i use UNICODE and DIRECTORY() to get Array for GRID
i did not notice this before unter harbour / HMG
i know this from Xbase++ that DIRETORY() under GUI will return ANSI .. how about HMG
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: File with German Umlaute -> Directory() ?
hi,
when i ZIP Demofile i got this Warning from Total Commander what does "Codepage" for a Image mean ... or is it just "?" in Filename
---
i can´t RENAME / FRENAME() it and also SH-Operationen (ala Explorer) fail (with Side-Effect)
i can use Explorer, which show it right, to edit (F2) Filename
so how with HMG Unicode Version
when i ZIP Demofile i got this Warning from Total Commander what does "Codepage" for a Image mean ... or is it just "?" in Filename
---
i can´t RENAME / FRENAME() it and also SH-Operationen (ala Explorer) fail (with Side-Effect)
i can use Explorer, which show it right, to edit (F2) Filename
so how with HMG Unicode Version
have fun
Jimmy
Jimmy
Re: File with German Umlaute -> Directory() ?
Hi Jimmy, your sample file is correctly listed with Directory() using UNICODE, but wrong with DEWIN and DE850. Other files created by me containing the character ü are listed correctly in all three coding pages.
The file names returned by the Directory() function are encoded in the same code page as set in run time.
In your case, I suggest that you use the UTF8 encoding page to list files and folders.
The file names returned by the Directory() function are encoded in the same code page as set in run time.
In your case, I suggest that you use the UTF8 encoding page to list files and folders.
- Attachments
-
- directory.7z
- (128.61 KiB) Downloaded 111 times
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: File with German Umlaute -> Directory() ?
hi,
THX for help, i will look at your Sample.
i have to check it but i "think" i do no set any Codepage, only when open DBF ... hm ... perhaps FMSetup.DBF
THX for help, i will look at your Sample.
i have to check it but i "think" i do no set any Codepage, only when open DBF ... hm ... perhaps FMSetup.DBF
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: File with German Umlaute -> Directory() ?
You are right.
i have set Codepage at Startup (HBFM.PRG)
after change Codepage all look fine
but now i have Problem with FreeImage to load file
i got Error and no Handle from FreeImage
after Error FreeImage does not work any more and no Image are shown.
but when press ENTER to use Windows Viewer all seems to work right
so i have to look why FreeImage fail when call from App.
i also try to convert UFT8 -> ANSI
but Result is not correct
---
i "think" i made the Error when got Attachment from Outlook and "save" it to Disk
when look in CMD Window it have a Square where HMG show "?" so Filename is wrong.
when rename File in Explorer (F2) i can load File with FreeImage so Image self is OK
i have to fix it in my App where i get Outlook Attachment.
THX for help
i have set Codepage at Startup (HBFM.PRG)
after change Codepage all look fine
but now i have Problem with FreeImage to load file
Code: Select all
bError := ERRORBLOCK( { | oErr | BREAK( oErr ) } )
BEGIN SEQUENCE
nType := FREE_GetFileType( cPath + cFile, 0 )
nFreeHandle := FREE_Load( nType, cPath + cFile, 0 )
END SEQUENCE
ERRORBLOCK( bError )
IF EMPTY( nFreeHandle )
Msginfo( "Error loading : " + cPath + cFile )
RETURN nil
ENDIF
after Error FreeImage does not work any more and no Image are shown.
but when press ENTER to use Windows Viewer all seems to work right
so i have to look why FreeImage fail when call from App.
i also try to convert UFT8 -> ANSI
Code: Select all
cFile := HMG_UNICODE_TO_ANSI(cFile)
IF !FILE(cFile)
---
i "think" i made the Error when got Attachment from Outlook and "save" it to Disk
when look in CMD Window it have a Square where HMG show "?" so Filename is wrong.
when rename File in Explorer (F2) i can load File with FreeImage so Image self is OK
i have to fix it in my App where i get Outlook Attachment.
THX for help
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: File with German Umlaute -> Directory() ?
hi,
i have a Side Effect with my Combobox when use
or not set Codepage ( Default UTF8 in Unicode Version)
Combobox use Drive Letter and that seems to fail while Combobox is empty
when go back and use
all work again ... so what can be the Problem
i have a Side Effect with my Combobox when use
Code: Select all
SET( _SET_CODEPAGE, "UTF8" )
Combobox use Drive Letter and that seems to fail while Combobox is empty
when go back and use
Code: Select all
SET CODEPAGE TO GERMAN
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2064
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: File with German Umlaute -> Directory() ?
hi
OK got it.
i have a lot of HMG_Calldll() with "A" Function
when using UTF8 i need "W" Function ... so some Work wait for me
OK got it.
i have a lot of HMG_Calldll() with "A" Function
when using UTF8 i need "W" Function ... so some Work wait for me
have fun
Jimmy
Jimmy
-
- Posts: 245
- Joined: Sat Aug 02, 2008 5:03 pm
Re: File with German Umlaute -> Directory() ?
Hi, you dont need to put A or W. these are settled in the headers files, so you can call one function without adding the suffix A/W
Regards/Saludos, Carlos (bcd12a)