Jorge Gabuardi
|
| Posted: 11/15/2006, 12:27 PM |
|
I have an app. in spanish, so the users are using latin characters like
(á,é,...ñ,Ñ), but for some reazon the HTML generated from database (like
dynamic combos) some times is "compaÁa" and somtimes "compaÁa".
All the character that are in javascrip area is like Á and the one is
in HTML area is like Á.
Any body has a javascript function to convert from symbol to ANSI char
Do someone can help me?
Regards
Jorge
|
|
|
 |
Oper
Posts: 1195
|
| Posted: 11/15/2006, 6:43 PM |
|
Try to use UTF 8 or use same Type of char on the HTML and Database character set
talvez el 75% de nuestras apliaciones son en español, MySQL nosotros utilizamos latin-1 pero en las otras base de datos UTF-8
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
Jorge Gabuardi
|
| Posted: 11/19/2006, 5:04 PM |
|
Thank you
But your suggestion did not work
I made this function to convert the characters and is working
function corrige(cvalor) {
cvalor=cvalor.replace(/\&\#193;/g,"\u00C1");
cvalor=cvalor.replace(/\&\#201;/g,"\u00C9");
cvalor=cvalor.replace(/\&\#205;/g,"\u00CD");
cvalor=cvalor.replace(/\&\#209;/g,"\u00D1");
cvalor=cvalor.replace(/\&\#211;/g,"\u00D3");
cvalor=cvalor.replace(/\&\#218;/g,"\u00DA");
cvalor=cvalor.replace(/\&\#225;/g,"\u00E1");
cvalor=cvalor.replace(/\&\#233;/g,"\u00E9");
cvalor=cvalor.replace(/\&\#237;/g,"\u00ED");
cvalor=cvalor.replace(/\&\#241;/g,"\u00F1");
cvalor=cvalor.replace(/\&\#243;/g,"\u00F3");
cvalor=cvalor.replace(/\&\#250;/g,"\u00FA");
return cvalor; }
Regards
Jorge
"Oper" <Oper@forum.codecharge> wrote in message
news:6455bd05e58e61@news.codecharge.com...
> Try to use UTF 8 or use same Type of char on the HTML and Database
> character set
> _________________
> GLOBAL DEVELOP
> http://www.GlobalDevelop.com (small Comunity)
> Flash + CCS - Scripts and Samples
> (SWISHMAX + CODECHARGE STUDIO)
>
> http://www.PremiumWebTemplate.com
> Affiliation Web Site Templates & Free Stuff
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Edd
Posts: 547
|
| Posted: 11/19/2006, 5:11 PM |
|
Jorge
Not sure if this will help but check that your HTML page has the right location for your region.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
|