Jump to content



Photo
- - - - -

need to change encoding


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1   malyha1

malyha1
  • Members
  • 35 posts

Posted 01 August 2004 - 20:55

What does unicode do?

Does it allow any language to be viewable? Or is it to view a certain language?

#2   malyha1

malyha1
  • Members
  • 35 posts

Posted 02 August 2004 - 15:30

Any help?

Please I can't view my site. Someone help.

When I view my site, I always have to go to view>Encoding>Windows(Arabic) to be able to view it. Is there a way I can change the code to open IE encoded in Windows-1256 by default?

Please help.

Malyha

#3   malyha1

malyha1
  • Members
  • 35 posts

Posted 02 August 2004 - 20:55

Where do I change the encoding to windows-1256?

There is something in oscommerce code that defines charset. I defined it in english.php and in arabic.php but the encoding is still defaulting to western english

What does this do?
@setlocale(LC_TIME, 'en_US.ISO_8859-1');


#4   james_times

james_times
  • Members
  • 55 posts

Posted 05 August 2004 - 19:51

I have same problem. I changed the the following lines:

define('HTML_PARAMS','dir="LTR" lang="mylanguagecode"');
define('CHARSET', 'mylanguage-encoding');

But the explorer cannot be set automatically to the defined language encoding.

Strange enough, when I use view source menu and save the page in html file, the html works. The explorer is automatically set to the language encoding.

But it does not work for the HTML generated by the PHP. There must something need to be fixed.

Anyone has any ideas or experience that can be shared here?

#5   james_times

james_times
  • Members
  • 55 posts

Posted 05 August 2004 - 20:28

After a couple of tests, I find the problem is with PHP only. I use the following simple HTML code:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5"> 
</head>
<body dir="LTR" lang="tw">
以一變千, 生機無限
</body>
</html>

If I save to HTML, the browser will automatically set to ChineseBig5. But if I save it into PHP file, the browser will automatically set back to Westen Language EVEN I have maually set the encoding to ChineseBig5.

There must be some thing in PHP we must take care of. Helps are appreciated.

#6   james_times

james_times
  • Members
  • 55 posts

Posted 05 August 2004 - 20:46

Okay, now I find that the problem is with the Apache web server. If I launch the HTML from the Apache, instead of double clicking to run directly from the Windows, the same problem happens.

I uploaded the test PHP file to my real web server, it works.

So, what you want to change in osCommerce is just two lines:

define('HTML_PARAMS','dir="LTR" lang="yourlanguagecode"');
define('CHARSET', 'yourlanguage-encoding');

in yourlanguage.php file.

#7   malyha1

malyha1
  • Members
  • 35 posts

Posted 06 August 2004 - 22:19

Thanks a lot James

I have changed the same two line previously but it didn't work. Do you know where I can find a list with the options for languages? I am typing

define('LANGUAGE_CURRENCY', 'USD');

// Global entries for the <html> tag
define('HTML_PARAMS','dir="LTR" lang="ar"');

// charset for web pages and emails
define('CHARSET', 'win1256');

Is the language code typed correctly? Or should it be spelled differently? I really appreciate your help.

I talked to my hosting company and they said that they don't know how to fix it. I told them that they need to change their server but you know, may be I am wording it incorrectly and that is causing them to not understand what I mean. What do you think I should tell them to change?

Thanks

Malyha