🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.javascript
5 messages
5 total messages Started by B�rge Mon, 22 Jul 2002 10:55
Override codepage
#11
Author: B�rge
Date: Mon, 22 Jul 2002 10:55
17 lines
1647 bytes
Hi,
i am using nation specific characters in a javascript function that
uses document.write, i.e 
document.write('nation specific characters ���')

This works well locally, but not when deployed on the server. I can
change the codepage on the development server, and i would work, but i
can't do this on the production server, where UTF-8 is used.

Is there somehow this can be done programmatic?
I have tried to use
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">

on the page that included the .js file, but it didn't help.

Any idea?
Re: Override codepage
#12
Author: Jim Ley
Date: Mon, 22 Jul 2002 10:55
17 lines
1584 bytes
On 22 Jul 2002 11:55:53 +0100, borge.lotre@bekk.no (B�rge) wrote:

>Hi,
>i am using nation specific characters in a javascript function that
>uses document.write, i.e 
>document.write('nation specific characters ���')
>
>This works well locally, but not when deployed on the server. I can
>change the codepage on the development server, and i would work, but i
>can't do this on the production server, where UTF-8 is used.

So why not just use UTF 8 characters?  it contains everything your
"nation specific character set does", and is more supported.

Jim.
-- 
comp.lang.javascript FAQ - http://jibbering.com/faq/
Re: Override codepage
#13
Author: B�rge
Date: Mon, 22 Jul 2002 11:20
26 lines
2066 bytes
This is because users are free to type whatever they want and i can't
control what characters they are using. It can be norwegian, german,
arabic and any other language. 

--B�rge.

On Mon, 22 Jul 2002 10:55:11 GMT, jim@jibbering.com (Jim Ley) wrote:

>On 22 Jul 2002 11:55:53 +0100, borge.lotre@bekk.no (B�rge) wrote:
>
>>Hi,
>>i am using nation specific characters in a javascript function that
>>uses document.write, i.e 
>>document.write('nation specific characters ���')
>>
>>This works well locally, but not when deployed on the server. I can
>>change the codepage on the development server, and i would work, but i
>>can't do this on the production server, where UTF-8 is used.
>
>So why not just use UTF 8 characters?  it contains everything your
>"nation specific character set does", and is more supported.
>
>Jim.
>-- 
>comp.lang.javascript FAQ - http://jibbering.com/faq/
>
Re: Override codepage
#14
Author: Jim Ley
Date: Mon, 22 Jul 2002 11:23
13 lines
1526 bytes
On 22 Jul 2002 12:20:49 +0100, borge.lotre@bekk.no (B�rge) wrote:

>This is because users are free to type whatever they want and i can't
>control what characters they are using. It can be norwegian, german,
>arabic and any other language. 

Then you can't choose a character set can you? your only option will
be UTF-8, so you'll have to map them yourselves, a HTML document can't
use more than one character set in any case.

Jim.
-- 
comp.lang.javascript FAQ - http://jibbering.com/faq/
Re: Override codepage
#15
Author: B�rge
Date: Mon, 22 Jul 2002 13:03
24 lines
2012 bytes
It seems like the browser can't desice which encoding to use. If i
type a norwegian charachter in the text the encoding is set to UTF-8
in the browser and everything works.

Thanks.

--B�rge.

On Mon, 22 Jul 2002 11:23:14 GMT, jim@jibbering.com (Jim Ley) wrote:

>On 22 Jul 2002 12:20:49 +0100, borge.lotre@bekk.no (B�rge) wrote:
>
>>This is because users are free to type whatever they want and i can't
>>control what characters they are using. It can be norwegian, german,
>>arabic and any other language. 
>
>Then you can't choose a character set can you? your only option will
>be UTF-8, so you'll have to map them yourselves, a HTML document can't
>use more than one character set in any case.
>
>Jim.
>-- 
>comp.lang.javascript FAQ - http://jibbering.com/faq/
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads