FTPDirectoryEntryName CP1251

Everything else that doesn't fall into one of the other PB categories.
Gemorg
New User
New User
Posts: 7
Joined: Tue Feb 17, 2015 9:33 pm

FTPDirectoryEntryName CP1251

Post by Gemorg »

Hi!
I am using this code:

Code: Select all

InitNetwork()

If OpenFTP(0, "XXX.XXX.XX.XXX", "XXXXX", "XXXXXXX", 0)
  
  If ExamineFTPDirectory(0)
    While NextFTPDirectoryEntry(0)
      Debug FTPDirectoryEntryName(0)
    Wend
  EndIf
  
  Debug "finished"
  
Else
  MessageRequester("Error", "Can't connect to the FTP server")
EndIf
FTP server has a folder with Russian characters: "Сервер Готы".
But in the debug output is: "Сервер Готы"

I tried to compile in Ansi and Unicode mode, there is no difference.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: FTPDirectoryEntryName CP1251

Post by IdeasVacuum »

It might be a function limitation, but make sure the following is true:

Use latest version PB5.31 which delivers a UTF8 debug window.
Use a font for the PB IDE that supports the Unicode required for the Russian language (Microsoft Sans Serif, Source Code Pro).
Ensure that your source code files are UTF8 (sounds strange but it is currently necessary).
Compile in Unicode mode.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply