473,890 Members | 1,199 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?


Jul 17 '05 #1
2 2169
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
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?



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

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 __________________________________
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>
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");
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<<<<<<
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.
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;
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...
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?
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) {
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...
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,...
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...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.