Welcome to WebmasterWorld Guest from 54.147.0.174

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP, MySQL & HTML with French Accents

How do I handle french accents?

     

The_Warden

5:55 pm on Sep 11, 2002 (gmt 0)

10+ Year Member



I realize this topic has been discussed but I was unable to find one that covered all my concerns and end the confusion. Here's my situation.

I have an expression that checks the validity of an e-mail address and an expression that creates a user name based on first/last name.

How do I add support to these expressions for French accents that PHP, MySQL and HTML can handle? Do I use HTML entities, unicode, URL encoding, etc.?

Here's the two expressions that are currently removing french accents.

User Name Creation
$prefix = substr($szFirstName, 0, 1);
$szLoginName = $prefix . $szLastName;
$szLoginName = strtolower($szLoginName);
$szFirstName = eregi_replace("[^a-z-]", "", $szFirstName);
$szLastName = eregi_replace("[^a-z-]", "", $szLastName)

E-mail Validity Check
ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{}~] +\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{}~]+$', $szEmail)

[edited by: jatar_k at 8:47 pm (utc) on Sep. 11, 2002]
[edit reason] added space in ereg to stop sidescroll [/edit]

jatar_k

8:48 pm on Sep 11, 2002 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



take a look at this thread

[webmasterworld.com...]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month