LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-20-2010, 09:21 PM   #1
kkruecke
LQ Newbie
 
Registered: Aug 2006
Posts: 20

Rep: Reputation: 0
scp command and internaltion characters


When I upload a file usind the scp that contains the German characters ü, ö, or ä, these characters get changed to �. For example, a sentence in an html file like this

Ein Unternehmen ist oft viel grösser als ein Betrieb und beschäftigt viel mehr Arbeitnehmer.

looks like this

Ein Unternehmen ist oft viel gr�sser als ein Betrieb und besch�ftigt viel mehr Arbeitnehmer.

Why are this characters getting changed?

thanks.
 
Old 02-20-2010, 09:29 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Are you talking about the contents of the file or the filename. I doubt that scp would change the character encoding of a file. It is more likely that your terminal on the target server doesn't use utf8 encoding.
 
Old 02-20-2010, 09:36 PM   #3
kkruecke
LQ Newbie
 
Registered: Aug 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for the reply. I am talking about the contents of the file. You can see it here:
http://www.kurttest.com/de/index.php...13/uebung.html
 
Old 02-21-2010, 06:29 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Just to verify what happens on my system, I cut and pasted your text to a file, and used scp to copy it to my desktop to verify that it retained the characters.

I would suggest a test where you use scp to copy the file to the remote server and then use scp to copy it back under a different name. Then run "cmp <original> <copy>".

Could you enter the command "locale" on the ssh client and remote ssh server computer and post the results. I am thinking that the server doesn't have utf8 support. If you cut and paste text from the terminal, or a program that doesn't have utf support, you might loose characters that don't exist in the terminal or program's character set.

Also run "file <textfile>" to print out which character set is used.
 
Old 02-21-2010, 06:33 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2019 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,190

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
http://www.kurttest.com/de/index.php...13/uebung.html
Seems to be a site error.
Please right click and choose "View Page Source" : Same errors.

Any other German site will show the correct letters, ä ö ü ß :
http://www.debian.org/distrib/packages.de.html

.....
 
Old 02-21-2010, 10:50 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
knudfl: The OP's problem is with files that he copied using scp, and not viewing web sites.
 
Old 02-21-2010, 11:32 AM   #7
kkruecke
LQ Newbie
 
Registered: Aug 2006
Posts: 20

Original Poster
Rep: Reputation: 0
I don't think it is scp. I downloaded the file from the server using scp, gave it a a different name, and ran cmp
> cmp uebung.html uebung-down.html

The files are identical. The file does not display the German letters--ä ö ü ß--properly locally, either.

http://localhost/de/marktplatz/les13/uebung.html

gives the same output as on the server. The uniquely German characters dispaly as �. But here is what is weird. When I edit the file on the server using vim

/var/www/kurttest.com/de/marktplatz/les13$ vim uebung.html

the German characters display as �. But, if I view the file locally, on my desktop machine, using Gvim or gedit the German characters display properly. Furthermore, while editing the file, if I do "view in Firefox" (using the gedit plugin, or, if I edit with Gvim, the Gvim equivalent capability), the German characters appear properly.

Locally, I have language-pack-de, language-pack-de-base and language-pack-gnome-de, the German language packs, installed. But they are not installed on the server. Maybe that explains why the files display o.k. locally when edited?

What is weird is that only this particular file is not displaying properly. I have a index.php file that calls the php readfile() function, to read the individual files.

Last edited by kkruecke; 02-21-2010 at 11:38 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp command zchoyt Linux - General 10 04-02-2014 07:47 AM
scp command Swapna173 Linux - Newbie 5 05-21-2009 01:54 AM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 06:02 AM
SCP Command yusufs Linux - Newbie 3 11-07-2007 02:44 PM
command of scp Paxmaster Linux - General 4 01-06-2005 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration