Solved

PHP - save unicoded text file

Posted on 2011-02-19
8
239 Views
Last Modified: 2012-05-11
Hi,

I've written a PHP script which creates and save a txt file with content inside - that works well.
Out of the 4 options that Notepad allows (ANSI, Unicode, Unicode big endian and UTF-8) I've only managed to find how to create the file as ANSI and UTF-8 but I need the Unicode one or any idea how to convert it afterward.

Will appreciate a solution for that.

Thanks
0
Comment
Question by:oferlll
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
8 Comments
 
LVL 4

Expert Comment

by:florjan
ID: 34932808
Utf-8 is an unicode charset
0
 
LVL 4

Accepted Solution

by:
florjan earned 250 total points
ID: 34932832
But these links should help
hsivonen.iki.fi/php-utf8/

http://www.phpwact.org/php/i18n/utf-8
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 34933164
Can you tell us WHY you need Unicode?  What characters are not available in the other character sets?

Also, you might benefit from reading this.  It is rather long and detailed, but it offers a good foundation.
http://www.joelonsoftware.com/articles/Unicode.html
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34956760
I'm going to post an objection to closing this question.   Please work with us here.  Did you read Joel Spolsky's article?  Can you tell us WHY you need Unicode?  What characters are not available in the other character sets?

Thanks, ~Ray
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34956766
Please give us an answer to the questions instead of declaring them "irrelevant."  Thanks.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34960442
Absent any response from the Asker, I think http:#34932832 and http:#34933164 cover the subject.  But I would hope to see the specific issues so we can see what characters are causing the problem.  

Some additional refs:
http://php.net/manual/en/intro.strings.php#100623
http://php.net/manual/en/language.types.string.php
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wordpress Only run code if on a certain page 11 36
Make login page safer 3 35
while read ID; do 4 58
how can I see what is posted inside an array to my website? 16 20
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question