Strange characters when transmitting JavaScript files
Remo Laubacher
remo.laubacher at ortic.com
Fri Jul 20 18:46:10 MSD 2007
thanks a lot! the users on the list are extremly fast..
it looks like you guys were right, there is a problem with the encoding. the
javascript files from fckedit are saved with different encoding (utf8/ansi)
problem was, that the client requested the page with iso-8859-1 and whenever
this happend it displayed these characters.
it didn't matter whether the backend was involved or not, it was only an
encoding problem!
Thanks again!
Remo
----- Original Message -----
From: "Jonathan Vanasco" <jvanasco at 2xlp.com>
To: <nginx at sysoev.ru>
Sent: Friday, July 20, 2007 4:29 PM
Subject: Re: Strange characters when transmitting JavaScript files
On Jul 20, 2007, at 10:20 AM, Remo Laubacher wrote:
> Hello Nginx Users,
>
> I'm new to nginx. I really like what I've seen so far, however there is
> one problem I couldn't solve during my tests.
> One application uses the FCKeditor and some JavaScript files are
> transmitted with some strange characters.
> It only happens with several files, not with every JavaScript file!
>
> fckeditorcode_gecko.js looks like this:
> /*
> * FCKeditor - The text editor for Internet - http://www.fckeditor.net
> * Copyright (C) 2003-2007 Frederico Caldeira Knabben
>
> The three characters at the beginning shouln't be there of course.
>
> I'm trying to solve this problem for quite a while but without much
> success so far. What I've tried:
> - rebooted system
> - recompiled nginx (latest version)
> - updated fckeditor to the latest version
> - "rewrote" javascript (open with vi and write to a new file)
> - played with mime type
> - renamed file to .txt (didn't change anything)
>
> What else could I try?
> Thanks a lot!
> Remo
my guess is that its a text encoding issue...
a_ the js file is encoded in a utf8 or other charset, perhaps with
the BOM ( byte order mark )
b_ the server is configured to be serving content in one charset,
but the browser is sending via another
try making sure that the js files are in ASCII or UTF8 without a
BOM , also check to see what charsets your nginx is supporting. you
might be best dropping down to utf8. it solves a lot of headaches.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| Founder/CTO/CVO
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
More information about the nginx
mailing list