nageswaragunupudi wrote:Seeking guidance from Experts.
I created files, with names encoded with different codepages like this using Harbour. (not xHarbour)Now I try to see the directory in dos-prompt:Code: Select all | Expand
function NatCreate() local aFiles := { "Own", Chr(196)+Chr(197)+Chr(198), Chr(196)+Chr(197)+Chr(198), ; CHR(208)+CHR(221)+CHR(222), HEXTOSTR( "E0B0AEE0B0A8E0B0B5" ) } local cdp := { "DEWIN", "DEWIN", "RU1251", "TRWIN", "UTF8" } FW_setunicode( .t. ) WinExec( "del c:\natfiles\src\*.*" ) AEval( aFiles, { |c,i| aFiles[ i ] := "My" + c + "File.txt" } ) xbrowser afiles AEVAL( aFiles, <|c,i| HB_CDPSELECT( cdp[ i ] ) HB_MEMOWRIT( "c:\natfiles\src\" + c, c ) return nil > ) return nil
We can see from the image is that the command prompt is using my default OEM codepage 437 (OEM English codepage)
Still all filenames created with different codepages are displayed correctly though different from the codepage used by the command window.
How?
I understand, though I am not sure, that Windows must be storing all directory information using UTF16LE.
Request our experts to guide and enlighten.
Code: Select all | Expand
Error BASE/1302 Argument error: HB_CDPSELECT
Code: Select all | Expand
Called from: TEST1.prg => HB_CDPSELECT( 0 )
Called from: TEST1.prg => (b)NATCREATE( 15 )
Called from: TEST1.prg => AEVAL( 0 )
Called from: TEST1.prg => NATCREATE( 18 )