Author Topic: Open files in UTF8 encoding over FTP  (Read 5904 times)

Sergey.Andreev

  • Community Member
  • Posts: 6
  • Hero Points: 0
Open files in UTF8 encoding over FTP
« on: June 04, 2007, 05:33:02 AM »
Hi everyone!
Can you help me?
The trouble:
I am using trial version of SE.12 and i always work with remote files using ftp/sftp.
And then i try to open files in utf8 enconding they open as SBCS/DBCS mode, and i cannot read it`s content.
(note : files does not contain signature what they in utf8).

Can you say how to open remotely files using custom encoding, or how to set to current document other encoding?
Thank you.
« Last Edit: June 04, 2007, 05:35:51 AM by Sergey.Andreev »

Rodney

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 798
  • Hero Points: 54
Re: Open files in UTF8 encoding over FTP
« Reply #1 on: June 04, 2007, 01:52:45 PM »
The FTP open tool window will automatically recognize encoding based on extension. This is usually beneficial with .xml (and .html to some extent). There is currently no way to specify the encoding when opening a remote file. I will log this as a feature request.

In the meantime you will need to manually download the file and open it locally. You can do this with the FTP Client tool window (View>Toolbars>FTP Client).

Sorry for the inconvenience.

--rodney

Sergey.Andreev

  • Community Member
  • Posts: 6
  • Hero Points: 0
Re: Open files in UTF8 encoding over FTP
« Reply #2 on: June 06, 2007, 10:25:42 AM »
Thank you for answer Rodney.

Sergey.Andreev

  • Community Member
  • Posts: 6
  • Hero Points: 0
Re: Open files in UTF8 encoding over FTP
« Reply #3 on: June 07, 2007, 09:42:21 AM »
Sorry for the inconvenience.

--rodney
Rodney, hi again. 
The same thing are appear then you work with CVS.  After commiting module, document encoding reset to SBCS/DBCS mode.  And content is not readable.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2897
  • Hero Points: 153
Re: Open files in UTF8 encoding over FTP
« Reply #4 on: June 07, 2007, 02:15:34 PM »
Sergey:

I just tested this with our CVS support and could not reproduce it.  Here is what I did:

  • Open a Unicode file
  • Check the encoding with the command below
  • Add the file to CVS
  • Verify that the encoding did not change
  • Commit the file
  • Verify that the encoding did not change
  • Modifiy the file
  • Commit the file
  • Verify that the encoding did not change

Here is the macro I used to verify the encoding.  You can paste this into any .e file, load it (Macro>Load Module) and run "test_show_encoding" on the SlickEdit command line.

Code: [Select]
_command void test_show_encoding() name_info(',')
{
   say('test_show_encoding p_encoding='p_encoding);
}

Could this be a font issue?  I did have to change my Font for "Unicode Source Windows" in the Font Configuration dialog.  Arial Unicode MS works well.

Sergey.Andreev

  • Community Member
  • Posts: 6
  • Hero Points: 0
Re: Open files in UTF8 encoding over FTP
« Reply #5 on: June 08, 2007, 07:04:58 AM »
It seems you are using files with unicode signature? In my situation I work without this signature.
If file has unicode signature, they are opened correctly over FTP and charset does not reset when you commit module.
I think main problem here it is, how slickedit determine encoding for opened buffers ???
p.s.
I am using SlickEdit Version 12.0.0.0 under Windows XP SP2
« Last Edit: June 08, 2007, 07:08:50 AM by Sergey.Andreev »