New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Swedish characters in Putty??

Got problems with your B2 or B3? Share and get helped!
Post Reply
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Swedish characters in Putty??

Post by trencarbe »

I copied some files from Windows to my BubbaTwo user share area, that had both swedish characters in file/directory name and inside the files.

Looking with Putty on the swedish named files gives me strange chars...

I want to be able to ssh from outside into BubbaTwo and read/get files, and to look at them at home via user share.

How do I copy files over to BubbaTwo so I preserve the naming of files and directories containing swedish characters??
squadra
Posts: 96
Joined: 19 Sep 2008, 09:02

Post by squadra »

putty: Configuration: Window > translation
received data assumed in latin-1, change into Latin-2

Maybe this helps?
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

change to Latin-2, East Europe??

anyway, it didn't work.


All the copied files from windows with swedish chars are messed up...


Other ideas?
Cohan
Posts: 21
Joined: 12 Aug 2008, 15:42

Post by Cohan »

Change PuTTY translation to UTF-8. Works for me in Umeå.

Konrad
yooakim
Posts: 43
Joined: 08 May 2007, 08:58

UTF-8 works fine

Post by yooakim »

UTF-8 with Putty works fine as well here in Ã…kersberga.

Also, if you only work on Windows it's worth getting Kitty whic is a more updated Putty:

http://www.9bis.net/kitty/

Cheers,
j
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

I realise that I've been unclear with how I done the copying from Windows to BubbaTwo...

I've copied the windows files to BubbaTwo with WinSCP. WinSCP with 'UTF8 = On' and 'End of Line = CR/LF' for both Windows/Linux'

Original Windows file:
File name:
åäö.txt

File content in Notepad:
å ä ö, å ä ö,

å ä ö, å ä ö,

å ä ö...


After that I looked into my mounted Samba share on Windows:
File name:
åäö.txt = OK!

File content in Notepad:
å ä ö, å ä ö,

å ä ö, å ä ö,

å ä ö... = OK!


Next I went to BubbaTwo directly with Putty/Kitty:
Putty/Kitty is set to UTF8 in 'Window/Translation'.
Shell is set first to 'LANG=sv_SE.UTF-8' then to 'LANG=en_US.UTF-8'

file name:
åäö.txt = OK!


File content:
# cat åäö.txt
â–’ â–’ â–’, â–’ â–’ â–’,

â–’ â–’ â–’, â–’ â–’ â–’,

â–’ â–’ â–’... = NOT OK for both locales!

The 'åäö' are messed up inside the file...


so the problem is that either I get good looking file names with 'åäö', and messed up content OR I get the file name messed up but the content looks good considering 'åäö'.

I would like to have good looking content inside Putty as well for the occasions when I ssh into my Bubba, not only from the Windows Samba side...!

Any ideas?
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Are you sure that file is save as UTF-8? It looks like it isn't, judging by the number of characters. Could you post a hexdump on that file?

Code: Select all

hexdump -C "filename"
/Johan
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

here you go:

Code: Select all

hexdump -C åäö.txt
00000000  e5 20 e4 20 f6 2c 20 e5  20 e4 20 f6 2c 20 0d 0a  |. . ., . . ., ..|
00000010  0d 0a e5 20 e4 20 f6 2c  20 e5 20 e4 20 f6 2c 20  |... . ., . . ., |
00000020  0d 0a 0d 0a e5 20 e4 20  f6 2e 2e 2e              |..... . ....|
0000002c
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

That doesn't look like UTF-8 to me. Is there a choice when you save the file to save it as UTF-8? If I remember correctly, notepad is a bit weird so a freindly advice would be to find a real text editor, not that toy microsoft ship with windows ;-)

/Johan
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

hehe, okay... :D

suggestions on Notepad replacement?
carl
Posts: 474
Joined: 07 May 2008, 04:41

Post by carl »

trencarbe wrote:hehe, okay... :D

suggestions on Notepad replacement?
there is always vim :)
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

or emacs... 8)


What I meant with my previous post is:
"Notepad replacement for Windows environment"...
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

I prefer ViM, but it takes some getting used to (I think it's worth it though).

NotePad++, ConTEXT and PSPad to name a few. I keep hearing about something called Emacs to, but I don't know.... ;-)

Seriously, it's hard to tell, you probably need to try around a bit, see what kind of functions are important to you. But I think as long as you stay clear form notepad, you can't really go wrong.

/Johan
trencarbe
Posts: 103
Joined: 11 Aug 2008, 16:02

Post by trencarbe »

alright, thanks for all your help!
Post Reply