Symbol changes when copy and pasting to a new file
Hello All,
This question below is about the content of an MRTG config file but the fact it's MRTG isn't really relevant, it's basically a plain text file... Well anyway, I have a file where a couple of lines in the file contain the degree symbol, i.e. --> ° The original file is displayed on a web frontend of Routers2 (probably not relevant either), and it displays perfectly as it is with the Degree symbol showing correctly on the page. Which shows like this: Code:
Degrees °F Code:
Degrees °F in VI or Gedit it shows just fine. So I ran the "od -a" command on both files and it is showing that there is an extra character within the NEW file's Octal representation. Here's the output from the the "od -a" commands: Code:
### GOOD FILE: As you can see above there is an extra character showing up after the copy/pasting. Not exactly sure what's going on... Puzzled..??? If anyone has any idea what's happening or has a better way in which copying the new file would create an EXACT replica of the original would be great!! Thanks in Advance, Matt |
Can you please describe in detail how the new filename was generated. by copy/pasting with mouse, or by some other way? Probably the app you used cannot handle this properly, or not configured properly. Using another application also may help (depends on your window manager, you can try gnome commander or simple command line tools also).
__________________________________ Happy with solution ... mark as SOLVED If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post. |
Hey pan64, thanks for the reply!
I'm pretty sure I just simply had the file open in Gedit (which was opened from a terminal during an SSH session to a server, so I was using the server's Gedit application and not my local Gedit). Then I did a "ctrl-a" to select all, then "ctrl-c" to copy, opened a new tab and did a "ctrl-v" to paste. I guess I'll try doing a "cp" on the original file then edit the new "copied" file and see if that has the same outcome. Thanks again for your reply, Matt |
Ok... Looks like doing a "cp" on the original instead of doing a copy/paste manually fixed my problem.
No more weird characters! I guess possibly since I was using Gedit through the terminal from another server, when I copied/pasted it, it ran the copied "material" through my laptops machine which I guess could have a different encoding or locale (or something like that) then the server has, and possibly "re-encoded" the characters... Just a shot in the dark lol. Thanks again for your suggestions! Thanks, Matt |
probably you are right: the encoding, the handling of "strange" signs is not an easy case especially across different hosts and locales. Glad to help you.
|
All times are GMT -5. The time now is 01:11 AM. |