Download Pelles C here: http://www.pellesc.se

Quote from: John Z on August 23, 2026, 10:09:58 PMHi,Cheers. I'm loathe to use codepages! What do you do for this kind of thing where you're dealing with Unicode file names? I guess the wide-character versions might work.
Well first I've never used these functions so a grain of salt with my comments.
Looking into the header there is no Unicode or wide character support for the functions. So support will be limited to code pages. If using ANSI code page ( I guess for the UK ?) for example then the 233 é exists and can be shown. However the ANSI code page does not include an n with diacritic in fact the only n is 241 ñ, so the closest substitution is made.
So try a different code page? I was going to suggest trying to get the 8.3 filename but it seems the same issue would hinder that too.
John Z
For example codepage 852 E4 is n with diacritic
Quote from: TimoVJL on August 23, 2026, 02:08:45 PMFunction fopen might be a problem too, as it works with ANSI filenames.That's a good point. What do you use for Unicode files?
I did some tests, even i don't like those functions, as i rather use Win32 API.
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]
mov dh,dl
xor dl,cl
sub dx,0101h
or dl,dh
cmp dl,255
jnz @b
retn 8
FindChar ENDP
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDefExitProcess PROTO :QWORD
printf PROTO :QWORD,: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
FindChar PROC src:QWORD,char:QWORD
mov rax,rcx
dec rax
@@:
inc rax
mov r8b,BYTE PTR [rax]
test r8b,r8b
setz cl
xor r8b,dl
setz ch
or cl,ch
jz @b
ret
FindChar ENDP
start PROC PARMAREA=4*SIZEOF(QWORD)
invoke FindChar,ADDR mystr,'a'
invoke printf,ADDR f1,ADDR mystr,rax
invoke ExitProcess,0
start ENDP
END start
Quote from: TimoVJL on August 24, 2026, 12:09:34 PME4 is Lower case n with acute

Quote from: John Z on August 23, 2026, 10:09:58 PMFor example codepage 852 E4 is n with diacritichttps://www.ascii-codes.com/cp852.html
Page created in 0.069 seconds with 15 queries.