473,503 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP, MySQL and extended characters


In oracle I can do the following:

select CONVERT(COLUMNOFNAMES,'US7ASCII') from mytable --

It will take a name like Albrecht Dürer and change it into Albrecht
Durer and is useful in where clauses where you do not know if a user is
going to enter u or ü -- I convert the user input into Durer as well
as the column and query against it and get hits ........ very useful.

I can't seem to get something similar working with MySQL --

where ( convert(COLUMNOFNAMES using swe7) like '%durer%'

produces no hits -- I ran a select and it seemed to be convert the ü
into a question mark .... my default character set is latin1 - the
characters are displaying ok in the php pages.

Anybody got a clue if there is anyway to get this working --
essentially diacritic insensative searching. Working great in Oracle
-- but only because of the way the US7ASCII set maps characters like ü
on u ....

Mar 21 '06 #1
2 1911
I'm trying to run pages of my site through an automatic translation program
such as babelfish.

I've written a code module translate.php, that gets the URL of the current
page, formats the query string etc. correctly to call babelfish, and then
calls the babelfish translation page using curl.

This actually works, and returns my page, all nicely translated into some
other language.

The problem I've run into is that, after the first translation, the page
comes back with babelfishes URLs prefixed to all URLs in the HTML. So if you
click another link, it also gets translated the same way. Actually, this is
great and wonderful except that I have a series of buttons on the bottom
that translate to different languages. So now the buttons, instead of
calling my translate.php function directly, will attempt to call it through
the translation page first, which totally screws it up.

What I want is the page to come back translated, yet somehow reset only the
certain URLs on the translate buttons so that they again call my
translate.php code directly, without the babelfish prefix.

Am I correct in thinking that I must somehow load the page into memory (from
babelfish), then search through it for the strings I want to replace, and
"edit" the HTML code, before I actually send it for output and display?

Any pointers/tips on doing this, or is there some easier way of dealing with
this? Thanks much.

--
Stephen Kay
Karma-Lab sk@karma-lab.NOSPAM.com
^^^^^^^
Mar 21 '06 #2
On Tue, 21 Mar 2006 21:57:00 GMT, Stephen Kay
<sk@karma-lab.nospam.com> wrote:
Am I correct in thinking that I must somehow load the page into memory (from
babelfish), then search through it for the strings I want to replace, and
"edit" the HTML code, before I actually send it for output and display?

Any pointers/tips on doing this, or is there some easier way of dealing with
this? Thanks much.

I'd say 'yes'.

I think I'd cheat and use javascript write for the ones that you
didn't want to be changed. But I accept that isn't the most
satisfactory solution
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>
Mar 22 '06 #3

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

Similar topics

0
2003
by: Bill | last post by:
Dear All, I have a question related to character set. The default encoding of MySQL is latin1. So, textual data should be interpreted as 8-bit character. Is that right? If the default...
6
2375
by: barthome1 | last post by:
Hello, My company collects data from non-US sources. We are starting projects where this data will be output in an XML document and passed around to our applications and third party tools. ...
4
3827
by: wob | last post by:
Many thanks for those who responded to my question of "putting greek char into C string". In searching for an solution, I noticed that there are more than one version of "Extended ASCII...
3
24483
by: JSM | last post by:
Hi, I am just trying to port an existing simple encryption routine to C#. this routine simply adds/substracts 10 ascii characters to each character in a text file (except quotes). The routine...
2
1779
by: Kevin Laurence | last post by:
Can anyone advise me on the use of UTF-8 in PHP and MySQL? What is the best approach? I would prefer to store HTML extended characters in the database as UTF-8, but I can only get the HTML to...
5
2703
by: Marijn | last post by:
Hello everybody, I am new to PHP and working on extending my knowledge of OOP. The posts in this group concerned with whether or not to use an OO approach when programming in PHP is not what I...
4
7209
by: =?Utf-8?B?Um9zaGFuIFIuRA==?= | last post by:
Hi All, I am new to C# programming; I am developing an application for recording audio data using voice modem. I am using HyperTerminal to manually process audio data. The modem when configured...
1
2663
by: s123 | last post by:
Hi, while invoking a web service, if in xml request message i wrap the extended ASCII characters with CDATA it is not returning the desired result, while this is not the case if i do not wrap...
13
48023
by: ramif | last post by:
Is there a way to print extended ASCII in C?? I tried to code something, but it only displays strange symbols. here is my code: main() { char chr = 177; //stores the extended ASCII...
0
7205
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,...
0
7093
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...
0
7348
jinu1996
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...
1
5021
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...
0
4685
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3175
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...
0
3166
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
397
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...

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.