-
May 12th, 2010, 01:47 PM
#1
my dreaded french apostrophe
hello
(php and oracle environment)
anybody know how to handle french apostrophe character.
you will find an example of the caracter I mean here:
http://wapedia.mobi/enwiktionary/apostrophe
-scroll about half way down the page, look for the section "Punctuation"
-it's the second one (most right) versions they show of the 2 versions under "apostrophe".
My french entourage, alot of time copy and paste from Microsoft Word into a textarea box, then I insert into oracle database. It doesn't understand that char and turns it into an upside down question mark (¿ ). I tried to use find and replace with php but it doesn't work. I will probably need to refer to it by it's ascii definition, but not sure on how to do that. I even tried to trick it into doing the "ereg" replace of the "¿ " back into a normal apostrophe but that doesn't seem to work either.
-
May 12th, 2010, 01:58 PM
#2
Re: my dreaded french apostrophe
ok I found a better site for it
http://www.fileformat.info/info/unic...2019/index.htm
now at least I know the encodings' name for it, so how to I grab this when it's comming in raw, and tell it to convert to a normal apostrophe BEFORE I insert into the database?
-
May 12th, 2010, 02:10 PM
#3
Re: my dreaded french apostrophe
The only reason it won't work naturally is if the page's encoding or the database/table/column encoding is not compliant. Make sure all 4 are UTF-8 and you won't have a problem.
Last edited by PeejAvery; May 12th, 2010 at 05:04 PM.
Reason: Spelling
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
May 12th, 2010, 02:32 PM
#4
Re: my dreaded french apostrophe
it's just that I don't always have control over the database/table/column format.
could I not somehow do something like this:
$textarea = (whatever php fuctions that converts into a html entity)
then use: ereg_replace('’", "whateverItIS", $textarea)
($textarea could be a long paragraph)
let me guess... if it's not UTF 8 it already doesn't know what the hex encoding is or will give me the hex of the wrongly parsed character?
Last edited by bobo; May 12th, 2010 at 02:37 PM.
-
May 12th, 2010, 05:05 PM
#5
Re: my dreaded french apostrophe
Originally Posted by bobo
let me guess... if it's not UTF 8 it already doesn't know what the hex encoding is or will give me the hex of the wrongly parsed character?
Correct.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|