Download Pelles C here: http://www.pellesc.se
#include <dirent.h>
#include <locale.h>
...
setlocale(LC_ALL, "");
...
_DIR *dir;
struct _dirent *dirent;
dir = _opendir(path); // Open the folder
...
dirent = _readdir(dir); // Read first entry in folder // Read first entry in folder
if (dirent == NULL)
{ perror(path);
return 1;
}
while (dirent != NULL) // While not at end of folder
{
printf("dirent->d_name = %s\n", dirent->d_name);
...
Which results indirent->d_name = Art of Beksinski 1978 (MHS) (2).jpgLater code tries to open the files found:FILE *fh = fopen(fn, "rb");which of course results in an error message:Couldn't open test data\Art of Beksinski 1978 (MHS) (2).jpg: No such file or directoryThe actual filename is "Art of Beksiński 1978 (MHS) (2).jpg" with a diacritic on the "n". _readdir() worked as expected for "00tést.jpg" which has a diacritic on the "e"..386
.model flat,stdcall
option casemap:none
ExitProcess PROTO :DWORD
printf PROTO C :DWORD,:VARARG
.data
mystr db 'This is a test.',0
f1 db 'Address of the string = %X',13,10
db 'Address of the character a = %X',0
.code
OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
FindChar PROC src:DWORD,char:DWORD
mov eax,DWORD PTR [esp+4]
mov ecx,DWORD PTR [esp+8]
dec eax
@@:
inc eax
mov dl,BYTE PTR [eax]
test dl,dl
setz dh
xor dl,cl
setz ch
or ch,dh
jz @b
retn 8
FindChar ENDP
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef
start:
invoke FindChar,ADDR mystr,'a'
invoke printf,ADDR f1,ADDR mystr,eax
invoke ExitProcess,0
END start
include fileIO.inc
; Exit codes returned by WriteFileToDisc
; INVALID_HANDLE_VALUE equ -1 ; CreateFile API error
WRITEFILE_ERROR equ 0 ; WriteFile API error
WRITEFILEDISC_OK equ 1 ; Operation successfull
.code
WriteFileToDisc PROC pFileName:QWORD,pMemory:QWORD,nSize:QWORD PARMAREA=7*SIZEOF QWORD
; pFileName : pointer to the file name
; pMemory : address of the data block to write to disc
; nSize : number of bytes to write
LOCAL hFile:QWORD
LOCAL BytesWritten:QWORD
LOCAL ExitCode:QWORD
LOCAL _pMemory:QWORD
LOCAL _nSize:QWORD
mov _pMemory,rdx
mov _nSize,r8
invoke CreateFile,pFileName,GENERIC_WRITE,0,0,\
CREATE_ALWAYS,0,0
cmp eax,INVALID_HANDLE_VALUE
je _exitB
mov hFile,rax
mov rcx,rax
mov ExitCode,WRITEFILE_ERROR
lea r9,BytesWritten
invoke WriteFile,rcx,_pMemory,_nSize,r9,0
test rax,rax
jz _exitA
mov ExitCode,WRITEFILEDISC_OK
_exitA:
invoke CloseHandle,hFile
mov rax,ExitCode
_exitB:
ret
WriteFileToDisc ENDP
END
Quote from: John Z on August 16, 2026, 09:45:08 PMQuote from: rubidus on August 15, 2026, 05:51:56 PMHi — same situation here. I'm working on a Korean (rsrc0012.dll, ko-KR) translation of the Pelles C IDE language pack and the compiler help.
If you are doing these translations professionally you might look at CHM EDITOR PRO, it purports to be able to edit .chm files intact with all html code untouched WYSIWYG and invisible much like an RTF editor. It also claims in line translation capability using a Google API. A bit pricey for a private individual perhaps, so I've not yet acquired it. I would like to though-
There is another thread or two about converting to Chinese which might have some tips, forum member ander_cc for example here: https://forum.pellesc.de/index.php?topic=11776.msg42219#msg42219.
John Z
Quote from: rubidus on August 15, 2026, 05:51:56 PMHi — same situation here. I'm working on a Korean (rsrc0012.dll, ko-KR) translation of the Pelles C IDE language pack and the compiler help.
-
Page created in 0.071 seconds with 15 queries.