server side include, UTF-8 problem

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

server side include, UTF-8 problem

Marcin Operacz-2
Hello,

We have some problems with server side including of UTF-8 files, can  
you please confirm that this is impossible to make nginx include UTF-8  
text files (the ones that have 'ef bb bf' on the first 3 chars of the  
file)? If this is possible please give me some advice on what should I  
look to make this work.

Regards,

Marcin

Reply | Threaded
Open this post in threaded view
|

Re: server side include, UTF-8 problem

Michael Shadle
i think that 3 char signature is considered the "utf8 BOM"

On Thu, Jul 23, 2009 at 12:14 PM, Marcin
Operacz<[hidden email]> wrote:

> Hello,
>
> We have some problems with server side including of UTF-8 files, can you
> please confirm that this is impossible to make nginx include UTF-8 text
> files (the ones that have 'ef bb bf' on the first 3 chars of the file)? If
> this is possible please give me some advice on what should I look to make
> this work.
>
> Regards,
>
> Marcin
>
>

Reply | Threaded
Open this post in threaded view
|

Re: server side include, UTF-8 problem

Cliff Wells
In reply to this post by Marcin Operacz-2
On Thu, 2009-07-23 at 21:14 +0200, Marcin Operacz wrote:
> Hello,
>
> We have some problems with server side including of UTF-8 files, can  
> you please confirm that this is impossible to make nginx include UTF-8  
> text files (the ones that have 'ef bb bf' on the first 3 chars of the  
> file)?

Just for clarification, that's known as a BOM (byte order mark).   It's
(sometimes) allowed but definitely not needed for UTF-8, and as noted
below, can cause issues for some software:

http://unicode.org/faq/utf_bom.html#bom5

>  If this is possible please give me some advice on what should I  
> look to make this work.

No idea if it is expected to work in Nginx or not.  Perhaps the easiest
solution would be to edit the files in something that doesn't generate
the BOM.

Regards,
Cliff

--
http://www.google.com/search?q=vonage+sucks


Reply | Threaded
Open this post in threaded view
|

Re: server side include, UTF-8 problem

Maxim Dounin
In reply to this post by Marcin Operacz-2
Hello!

On Thu, Jul 23, 2009 at 09:14:18PM +0200, Marcin Operacz wrote:

> Hello,
>
> We have some problems with server side including of UTF-8 files, can you
> please confirm that this is impossible to make nginx include UTF-8 text
> files (the ones that have 'ef bb bf' on the first 3 chars of the file)?
> If this is possible please give me some advice on what should I look to
> make this work.

nginx is 8-bit clean and doesn't care what you include.  It can
happily include even binary files.

I guess your problem is that something after nginx isn't happy
with utf-8 bom in the middle of the text.  Not sure if it's
allowed according to utf-8 spec, but anyway it doesn't looks like
nginx problem for me.

Maxim Dounin