473,382 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Convert HTML entities to Unicode UCS2? What to do?

Hallo,

does anyone know how to convert HTML Entities into UCS2-String (Value).
For example: I need to convert Sułowska 43 (value in mysql
database) to a unicode string with the specified polish character(s)
(Polish is just a example).
--- Currently i convert every usual ASCII-String by using the php
multibyte functions. This it how it looks like: ---

$string_ASCII = "test";
$string_UCS2 = mb_convert_encoding( $string_ASCII, 'UCS-2LE',
'ISO-8859-1');

-----

Any ideas? Thanks in advance...
Regards,
Alexander

Jan 25 '07 #1
1 4321
..oO(Al************@googlemail.com)
>does anyone know how to convert HTML Entities into UCS2-String (Value).
You could try one of these:

http://www.php.net/html_entity_decode
http://www.php.net/recode

HTH
Micha
Jan 25 '07 #2

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

Similar topics

10
by: Maxim Kasimov | last post by:
there are a few questions i can find answer in manual: 1. how to define which is internal encoding of python unicode strings (UTF-8, UTF-16 ...) 2. how to convert string to UCS-2 (Python 2.2.3...
8
by: Eric Lilja | last post by:
Hello, I had what I thought was normal text-file and I needed to locate a string matching a certain pattern in that file and, if found, replace that string. I thought this would be simple but I had...
4
by: Marco Iannaccone | last post by:
I'd like to start using Unicod (especially UTF-8) in my C programs, and would like some infos on how to start. Can you tell me some documents (possibily online) explaining Unidoce and UTF-8, and...
8
by: davihigh | last post by:
My Friends: I am using std::ofstream (as well as ifstream), I hope that when i wrote in some std::string(...) with locale, ofstream can convert to UTF-8 encoding and save file to disk. So does...
2
by: Albert | last post by:
How can I convert some html entities (polish) to a character which I can use in a javascript alert? The entities are: ń ę ń ą ż ś ć
8
by: Steven D'Aprano | last post by:
I have a string containing Latin-1 characters: s = u"© and many more..." I want to convert it to HTML entities: result => "© and many more..." Decimal/hex escapes would be...
3
by: ldng | last post by:
Hi, I'm looking for a way to convert en unicode string encoded in UTF-8 to a raw string escaped with HTML Entities. I can't seem to find an easy way to do it. Quote from urllib will only work...
6
by: coldpizza | last post by:
Hi! I am using the built-in Python web server (CGIHTTPServer) to serve pages via CGI. The problem I am having is that I get an error while trying to display Unicode UTF-8 characters via a...
2
by: neovantage | last post by:
hey geeks, I am using a function which convert unicode to entities. So that i can save values into mysql database into entities. This function really helps me when i display the store entity data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.