Problem with non ascii filename

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Problem with non ascii filename

Post by sakya »

Hi! :)

I'm trying to use fat.c (from pmplayer-advance) to read file with non ascii names.
All seems to work (I can read the name without the problems found using readdir() function) but I'm unable to correctly print the name to screen.

Image
[filenames are: àèìòù, così and Perché]

Once I red the directory I try to output the names (I'm using OSLib):

Code: Select all

oslDrawString(0, 20 + 15 * i, finfo[i].longname);
oslDrawString(240, 20 + 15 * i, finfo[i].filename);
I can see the difference: finfo.filename has all non ascii characters converted to the same sequence, while finfo.longname makes difference between characters.
The problem is I don't see the correct name on screen.
With OSLib I have no problem to print a string like "àèìòù" but the filenames have these characters "converted"

Do I have to write my own conversion function mapping all characters or there's a "standard" function to do this?

Can someone please help me?

Many thanks. :)

Ciaooo
Sakya
PosX100
Posts: 98
Joined: Wed Aug 15, 2007 1:02 am

Post by PosX100 »

If you're using oft fonts(oslib fonts) , then probably that's the problem.

Try to print text without custom fonts(using debug screen) .
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
PosX100 wrote:If you're using oft fonts(oslib fonts) , then probably that's the problem.

Try to print text without custom fonts(using debug screen) .
Thanks, I'll try, but I don't think this is the problem.
I have no problems displaying things like:

Code: Select all

oslDrawString(0, 10, "àèìòù");
I think the problem is the string (is this ANSI?).

Ciaooo
Sakya
PosX100
Posts: 98
Joined: Wed Aug 15, 2007 1:02 am

Post by PosX100 »

Then you should try to create your own character map , and map each character based on index..
alexp
Posts: 39
Joined: Tue Apr 17, 2007 12:06 am

Post by alexp »

i don't know how fat.c access files, but psp filesystem calls, like sceIoDread, has a strange way of returning non ASCII filenames and uses some Devctl eand ioctls calls too. You can take a look at my previous work a http://forums.ps2dev.org/viewtopic.php?t=8590.
This was valid under CF 3.40 OE, but i think it's still ok.
Post Reply