Reply To: Firefly Media Server doesn’t scan for Chinese filename

#6070
ckyang
Participant

After replace firefly.exe:

2006-08-21 15:03:53 (ad2cf70a): Starting with debuglevel 0
2006-08-21 15:03:53 (ad2cf70a): Error loading plugin C:Prog/rsp.dll: ?????????w???????C
2006-08-21 15:03:53 (ad2cf70a): Error loading plugin C:Prog/w32-event.dll: ?????????w???????C
2006-08-21 15:03:53 (ad2cf70a): Error loading plugin C:Prog/ssc-ffmpeg.dll: ?????????w???????C
2006-08-21 15:03:53 (ad2cf70a): Error loading plugin C:Prog/ssc-wma.dll: ?????????w???????C
2006-08-21 15:03:53 (ad2cf70a): Starting rendezvous daemon
2006-08-21 15:03:53 (ad2cf70a): db_sqlite2_open: unable to open database: C/songs.db (C/songs.db)
2006-08-21 15:03:53 (ad2cf70a): Error opening db: Misc SQL Error: unable to open database: C/songs.db

So I copy C:Program FilesFirefly Media Serverplugins*.* to C:Prog
But still cannot scan songs.

2006-08-21 15:06:05 (ad2cf70a): Starting with debuglevel 0
2006-08-21 15:06:05 (ad2cf70a): Starting rendezvous daemon
2006-08-21 15:06:05 (ad2cf70a): db_sqlite2_open: unable to open database: C/songs.db (C/songs.db)
2006-08-21 15:06:05 (ad2cf70a): Error opening db: Misc SQL Error: unable to open database: C/songs.db

One of my friends review the source code and give some suggestion.

1. Firefly is built with multibyte character set. So when TChinese XP read file with Chinese filename, it will get MBCS (Multi-byte character set) encoded filename.
2. In this function os_readdir_r(), it uses UTF8 to UTF16 conversion. It may cause wrong conversion.
3. His suggestion is to use Windows API “MultiByteToWideChar” instead of UTF8-to-UTF16.

Thank you for prompt response.