473,799 Members | 3,114 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't interpret php code when file saved with unicode.

Hi ,

I use apache server , php and mysql to
implement a multi-language web admin
system, in order to display the required
language, the file needed to save with
unicode instead of ANSI. But the server
cant interpret the php code properly.
What should i do?

Regards,

Ricky
Jul 17 '05 #1
2 2164
lig
i you are saving the multi-byte characters in the HTML -As far as I
know you have only 1 option - using the HTML code for the individual
letters. This of course is not ideal when dealing witrh large blocks
of text.

I would suggest you look into the numerous methods of
internationaliz ation. Just off the top of my head (keeping php in
mind) I would suggest you look into gettext, IntSmarty (this is what I
chose to use), and there are 5 packages in PEAR that you may want to
check out
(http://pear.php.net/packages.php?cat...tionalization).
Do your research and find out which one will best suit your needs.

Jul 17 '05 #2
<ka*******@hotm ail.com> wrote in message
news:d8******** *************** ***@posting.goo gle.com...
Hi ,

I use apache server , php and mysql to
implement a multi-language web admin
system, in order to display the required
language, the file needed to save with
unicode instead of ANSI. But the server
cant interpret the php code properly.
What should i do?

Regards,

Ricky


Don't save as your files as UCS-2 (aka UTF-16) . Save them as UTF-8 instead.
PHP will parse them then.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
1778
by: George Hester | last post by:
http://hesterloli.dnsalias.com/test/javascript_image.htm The image is the 100x100 px block. If we right-click in it and try to save the image we cannot. Is it possible to say set a mime-type so that it can be saved? Thanks. -- George Hester __________________________________
18
10517
by: Robert Bowen | last post by:
Hello peeplez. I have an odd problem. When I put the ANSI symbol for "less than" ("<"), the word STRONG and then the ANSI symbol for "greater than" (">") in my web page, followed by some text, then close the STRONG tag the same way, my text appears in bold. No problem. When I do the same things with the corresponding HTML tags (&lt; , &gt; ) the tag is not interpreted, it is simply displayed: <STRONG>text</STRONG>
10
2472
by: Bobby T | last post by:
Here's the problem, when I try to append an RDP file (which is written in hex but readable in notepad) it adds funny little squares to the file. I have tried opening the file in every mode but nothing helps. Can anyone steer me in the right direction? Here's my current code: $file = "try_this.rdp"; $handle = fopen("$file","a+b"); fwrite($handle,"Hello");
3
3768
by: Benny Ng | last post by:
Dear all, The following is the source. The password is encrypted and saved into the Binary in SQL2K. Now I want to create a new page to compare the existed password and the password that in the database. But I don't know how to used source code to solve it. Can you help me? Urgently! <<<<<<Save Method<<<<<<
135
7534
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight over trivia. In this essay, i like to explain what is the situation behind it, and which is proper.
1
4065
by: markww | last post by:
Hi, I'm just trying to print the contents of a notepad file I saved with unicode encoding on my win xp machine. I keep getting strange characters printed out though. Why doesn't this work? std::wifstream wifile("C:\\unicode.txt"); if (wifile.is_open()) { wchar_t wszBuffer;
10
13981
by: lamxing | last post by:
Dear all, I've spent a long time to try to get the xmldocument.load method to handle UTF-8 characters, but no luck. Every time it loads a document contains european characters (such as the one below, output from google map API), it always said invalid character at position 229, which I believe is the "" character. Can anyone point me to the right direction of how to load such documents using the xmldocument.load() method, or...
1
2059
by: xoinki | last post by:
hi all, I have some data.. and I want to save it into a file.. the data may be encoded in any format.. for simplicity let us consider, only 2 formats.. either Utf8 or latin1.. if i save latin1 data it will be saved as ANSI.. if i save utf8 it will be saved as Unicode. Is there any way to detect encoding format of the file? Or, Forcibly save a file always in Unicode format what ever the data may be?
3
2487
by: Learning.Net | last post by:
How to read a Unicode data saved as ASCII in notepad file as txt ? I tried using streamReader but it is not showing Unicode data. eg. using (StreamReader sr = new StreamReader(test.txt) { string line; // Read and display lines from the file until the end of // the file is reached. while ((line = sr.ReadLine()) != null) {
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9067
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2935
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.