| Author |
Message |
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 11:04 am Post subject: UTF-8 problem on my linode. |
|
|
I have a java webapp I made (wiki) where you can enter text into a web form and save it on the server (edit page) ... anyway I made it so it can handle utf-8(foreign chars) and it works great on my local box (ubuntu 8.04) but when I run the exact same exact thing on my linode(tcolar), foreign character don't work .. it's as if the OS does not support UTF-8 ... so my question is, could the Linode somehow not support UTF-8, or not be setup for it ??
When I ssh a file from my machine with utf-8 into my linode it also appears that utf-8 chars get mangled (or maybe the ssh term can't display them, though it works with my other machines)
Any ideas ?
Thanks much. |
|
| Back to top |
|
Alucard
Joined: 13 Feb 2008
Posts: 116
|
| Posted: Thu Jan 28, 2010 11:27 am Post subject: |
|
|
what OS are you running on your linode?
did you generate the right locales on it? |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 11:55 am Post subject: |
|
|
Debian 4.0 Disk Image
(Latest 2.6 Stable (2.6.18.8-linode22))
I thought Debian 4 / etch was unicode by default, can you elaborate on generating the right locales ? |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 11:59 am Post subject: |
|
|
Will try this once more:
dpkg-reconfigure locales |
|
| Back to top |
|
hybinet
Joined: 02 May 2008
Posts: 971
|
| Posted: Thu Jan 28, 2010 12:12 pm Post subject: |
|
|
Also check that your web frontend is 1) encoded in UTF-8 and 2) accepting data in UTF-8:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form action="whatever.jsp" accept-charset="UTF-8"> ... </form> |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 12:26 pm Post subject: |
|
|
Yeah that I did, like i said it works fine on my own machine anyway.
The one difference i have on my linode is that the app server is proxied behind apache, but as far as i know apache is set to utf-8 as well.
Also I've compared response headers etc... and they all seem fine (utf-8) |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 12:29 pm Post subject: |
|
|
took apache out of the equation and still the same.
Another diff is that my own machine uses tomcat and the server jetty, though they both suppose to support utf8 fine.
Will try to use the EXACT same app server and see. |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 1:06 pm Post subject: |
|
|
| Same jetty version on both machine and still it works on my ubuntu 8.04 and not on the linode debian 4.0 --- weird ! |
|
| Back to top |
|
advocatux
Joined: 28 Apr 2009
Posts: 34
Location: Pale Blue Dot
|
| Posted: Thu Jan 28, 2010 1:24 pm Post subject: |
|
|
tcolar wrote: Same jetty version on both machine and still it works on my ubuntu 8.04 and not on the linode debian 4.0 --- weird !
Supposing you have properly configurated locales in your server, just check you have in /etc/ssh/sshd_config this
Code: # Allow client to pass locale environment variables
AcceptEnv LANG LC_*
P.S. Why are you using old_stable (Debian 4.0) instead of current stable (Debian 5.0)? |
|
| Back to top |
|
tcolar
Joined: 28 Jan 2010
Posts: 8
|
| Posted: Thu Jan 28, 2010 3:45 pm Post subject: |
|
|
No good reason other than I haven't upgarded.
What's the proper way to do that with a linode anyway, just do a standard debian dist-upgrade process ? |
|
| Back to top |
|
advocatux
Joined: 28 Apr 2009
Posts: 34
Location: Pale Blue Dot
|
| Posted: Fri Jan 29, 2010 1:41 pm Post subject: |
|
|
tcolar wrote: No good reason other than I haven't upgarded.
What's the proper way to do that with a linode anyway, just do a standard debian dist-upgrade process ?
It's just a standard process provided that you've a standard installation.
Two suggestions (official Debian information):
* Upgrades from previous releases
* Issues to be aware of for lenny
Don't forget to update the kernel as well. |
|
| Back to top |
|
BarkerJr
Joined: 02 Aug 2009
Posts: 220
Location: Connecticut, USA
|
| Posted: Sat Jan 30, 2010 10:01 am Post subject: |
|
|
| Why would Linux settings have anything to do with this? This is between Java and your browser. If you're using the same version Java and app server, and the files were transfered as binary, you should get the exact same result. |
|
| Back to top |
|
advocatux
Joined: 28 Apr 2009
Posts: 34
Location: Pale Blue Dot
|
| Posted: Sat Jan 30, 2010 11:29 am Post subject: |
|
|
BarkerJr wrote: Why would Linux settings have anything to do with this? This is between Java and your browser. If you're using the same version Java and app server, and the files were transfered as binary, you should get the exact same result.
Because tcolar asked two questions as a matter of fact and I'm replying to this problem:
tcolar wrote: When I ssh a file from my machine with utf-8 into my linode it also appears that utf-8 chars get mangled (or maybe the ssh term can't display them, though it works with my other machines) |
|
| Back to top |
|
| |