FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-11-2009, 10:50 PM
olopopo
 
Default WinSCP to Ubuntu SFTP charset problem

2009/2/11 Matthew Flaschen <matthew.flaschen@gatech.edu>

olopopo wrote:

> Hi everyone!

>

> I'm guessing if one of you has ever had this issue when copying files from

> Windoze to Ubuntu:

>

> I have a Windoze box that runs a WinSCP (SFTP client) against a Ubuntu SSH

> (SFTP server). Everything works fine when I copy files, but when files have

> special characters (Windoze's language is Spanish, so text may have ń,á,ó,

> and so) the Ubuntu server (utf8) shows them as a unrecognized char.



This is just an issue with the filenames, right?
Ok, I misunderstood the root of the problem, windows uses whatever is the default for spanish windows, which is cp1252 as you say and Ubuntu uses utf8, so what I need is either to convert the textfiles codification to utf8 or make Apache's default charset to iso8859-1 so the webserver displays html properly, right? Eerm, ok, I guess I didn't explained the scenario very well... sorry, I have win32 clients that winSCP (sftp) websites to ubuntu server, so what I really need is Apache decodes properly de textfiles.




> On WinSCP files show OK, then this makes me guess that WinSCP always uses

> iso8859-1 or iso8859-15 even if you set the force option to utf8.
*


>

> Does anyone had this problem?



See

http://lists.nongnu.org/archive/html/rdiff-backup-users/2009-01/msg00053.html

(read the whole thread). *It's basically the same problem, except you

use ISO/IEC 8859-15 (but are you sure it's not Windows-1252) instead of

cp1250.




> I know i can iconv the text files after copying, but that's just a poor

> patch.



You know about convmv (http://www.j3e.de/linux/convmv/man/)?


Yeah, I guess it does the same as iconv (http://linux.die.net/man/1/iconv), no?
*


> Is WinSCP's fault?



The root problem is probably that your filenames are stored in

Windows-1252, not UTF-16.*



*If this is so (that i guess) Is there a GPL/free win32

> SFTP (version 5) client out there?



You know WinSCP is GPL, right? *You can try Putty

(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html),

though, which is under a free license (MIT) but not GPL. *PSFTP is the

SFTP client.



> my only hope is that I find a SFTP java client that supports conversion to utf8.



Why Java?


Nevermind... work hours... :P didn't see the "root" of the problem, thanks!!
*



Matt Flaschen



Thanks,
Marcos Lorenzo de Santiago.
*



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 03:22 AM
Matthew Flaschen
 
Default WinSCP to Ubuntu SFTP charset problem

olopopo wrote:
>> This is just an issue with the filenames, right?
>
>
> Ok, I misunderstood the root of the problem, windows uses whatever is the
> default for spanish windows, which is cp1252 as you say and Ubuntu uses
> utf8, so what I need is either to convert the textfiles codification to utf8

You need to clarify. Is it the filenames that are the issue, or the
file content, or both?

> or make Apache's default charset to iso8859-1 so the webserver displays html
> properly, right? Eerm, ok, I guess I didn't explained the scenario very
> well... sorry, I have win32 clients that winSCP (sftp) websites to ubuntu
> server, so what I really need is Apache decodes properly de textfiles.

Okay... From this I think you mean the files' content are also in
cp1252. In that case, you can either serve it as such (windows-1252) or
preferably convert it to a standard encoding (e.g. utf-8) like you said.

>>> I know i can iconv the text files after copying, but that's just a poor
>>> patch.
>> You know about convmv (http://www.j3e.de/linux/convmv/man/)?
>>
>
> Yeah, I guess it does the same as iconv (http://linux.die.net/man/1/iconv),
> no?

iconv does not have any built-in file renaming features.

Matt Flaschen

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 06:10 AM
olopopo
 
Default WinSCP to Ubuntu SFTP charset problem

2009/2/12 Matthew Flaschen <matthew.flaschen@gatech.edu>

olopopo wrote:

>> This is just an issue with the filenames, right?

>

>

> Ok, I misunderstood the root of the problem, windows uses whatever is the

> default for spanish windows, which is cp1252 as you say and Ubuntu uses

> utf8, so what I need is either to convert the textfiles codification to utf8



You need to clarify. *Is it the filenames that are the issue, or the

file content, or both?
No sorry, it was only an issue with the contents...
*





> or make Apache's default charset to iso8859-1 so the webserver displays html

> properly, right? Eerm, ok, I guess I didn't explained the scenario very

> well... sorry, I have win32 clients that winSCP (sftp) websites to ubuntu

> server, so what I really need is Apache decodes properly de textfiles.



Okay... From this I think you mean the files' content are also in

cp1252. *In that case, you can either serve it as such (windows-1252) or

preferably convert it to a standard encoding (e.g. utf-8) like you said.
But since the clients need to access the webpages later through winscp (to modify them or change anything) I should have the contents of the files unchanged in the ubuntu box so it can be decoded by Windoze at any time.


Is that right?
*



>>> I know i can iconv the text files after copying, but that's just a poor

>>> patch.

>> You know about convmv (http://www.j3e.de/linux/convmv/man/)?

>>

>

> Yeah, I guess it does the same as iconv (http://linux.die.net/man/1/iconv),

> no?



iconv does not have any built-in file renaming features.
Ok, sorry I didn't notice. convmv does it for filenames, iconv for contents.





Matt Flaschen

Marcos Lorenzo de Santiago,

Thank you again
*



--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-13-2009, 02:49 AM
Matthew Flaschen
 
Default WinSCP to Ubuntu SFTP charset problem

olopopo wrote:
>> You need to clarify. Is it the filenames that are the issue, or the
>> file content, or both?
>
>
> No sorry, it was only an issue with the contents...

Okay, that makes it much easier.

> But since the clients need to access the webpages later through winscp (to
> modify them or change anything) I should have the contents of the files
> unchanged in the ubuntu box so it can be decoded by Windoze at any time.

Windows *can* decode and encode UTF-8. Now, sometimes it matters what
program you use. E.g. Notepad will make incorrect guesses sometimes
(http://blogs.msdn.com/oldnewthing/archive/2004/03/24/95235.aspx). But
in practice this isn't usually an issue (one reason is that if you save
a UTF-8 file from Notepad it will correctly open it because of the BOM).
Besides, other editors, such as Notepad2
(http://www.flos-freeware.ch/notepad2.html) will let you choose the
encoding manually.

Since both Windows and GNU/Linux programs can deal with UTF-8 and it is
The Future®, I suggest you switch to that (or if you want UTF-16,
UTF-32, etc.). With iconv, the initial conversion won't take much time,
and from then on just use UTF-8 when editing.

>> iconv does not have any built-in file renaming features.
>
>
> Ok, sorry I didn't notice. convmv does it for filenames, iconv for contents.

Right.

Matt Flaschen


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org