Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 14. január 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  mysql_set_charset

phpMyEdit Configuration     mysql_set_charset
Odoslať novú tému   Odpovedať na tému    
 
MarkDHamill     Založený: 30.01.2010   Príspevky: 8  
Príspevok Zaslal: 2010-05-31 16:17
Návrat hore  Odpovedať s citátom     

Where would I add the following statement?

Kód:
mysql_set_charset('utf8');


I've had to add this statement to other scripts I have written against my database because it appears my MySQL installation will not output UTF-8 by default. The result is funny characters on output when I am showing certain words in French.

I realize that the setup program can create headers that can specify the page is in UTF-8 but it alone will not solve my problem. I also have to tell MySQL to send data in UTF-8.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-06-02 12:05
Návrat hore  Odpovedať s citátom     

See the article referenced at
http://opensource.platon.sk/forum/projects/viewtopic.php?t=1152728

 
MarkDHamill     Založený: 30.01.2010   Príspevky: 8  
Príspevok Zaslal: 2010-06-02 13:28
Návrat hore  Odpovedať s citátom     

However, I don't think this is going to help because as best I can tell the data is encoded correctly in the database.

Collation information:

Kód:
phpBB3      utf8_general_ci


Varchar columns have the following collation:

Kód:
utf8_general_ci


In addition using a tool like phpMyAdmin I can edit data successfully in UTF-8.

It's something about MySQL not outputting data in UTF-8 by default. Since I am using shared hosting I don't think I can edit the my.cnf file. So I need to issue a statement to set the output type, which works. So I think if I add a statement like this at the appropriate place in the phpMyEdit code my problem will mysteriously disappear, as it has in the past.

Kód:
mysql_set_charset('utf8');


 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-06-02 16:16
Návrat hore  Odpovedať s citátom     

The correct META tags must appear in your HTML code, for example:


Kód:
<meta http-equiv="charset" content="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">


 
MarkDHamill     Založený: 30.01.2010   Príspevky: 8  
Príspevok Zaslal: 2010-06-03 22:48
Návrat hore  Odpovedať s citátom     

I'm sorry, I added both those lines to my HTML and they did not solve the problem.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2010-06-03 22:56
Návrat hore  Odpovedať s citátom     

If the data was *always* UTF8 (never in Latin1 or any other format), the appropriate META tags are in place, and the appropriate queries are issued after the db connection, then it should be working. Are you sure your PHP version supports the function referenced above?

http://www.oreillynet.com/onlamp/blog/2006/01/turning_mysql_data_in_latin1_t.html

Dump your web browser cache, close the browser, and re-open (since sometimes they misbehave and display cached pages even on reload).

 
MarkDHamill     Založený: 30.01.2010   Príspevky: 8  
Príspevok Zaslal: 2010-06-03 23:30
Návrat hore  Odpovedať s citátom     

I tried it in another browser and the same problem persists.

You can see it here. As you can see from the source code, the meta tags are applied.

Thanks for your help.

 
MarkDHamill     Založený: 30.01.2010   Príspevky: 8  
Príspevok Zaslal: 2010-06-05 23:34
Návrat hore  Odpovedať s citátom     

I seem to have fixed the problem by modifying the function sql_connect in phpMyEdit.class.php as follows:

Kód:
   function sql_connect() /* {{{ */
   {
      $this->dbh = @ini_get('allow_persistent')
         ? @mysql_pconnect($this->hn, $this->un, $this->pw)
         : @mysql_connect($this->hn, $this->un, $this->pw);
      mysql_set_charset('utf8');
   } /* }}} */


 
jdevlieghere     Založený: 30.04.2012   Príspevky: 1  
Príspevok Zaslal: 2012-04-30 11:06
Návrat hore  Odpovedať s citátom     

This last suggestion did the trick for me too - thx!

By the way, the official PHP documentation states:

"This (= mysql_set_charset) is the preferred way to change the charset. Using mysql_query() to execute SET NAMES .. is not recommended."
http://php.net/manual/en/function.mysql-set-charset.php

 
gutenzwerg     Založený: 29.03.2012   Príspevky: 4  
Príspevok Zaslal: 2013-05-11 17:02
Návrat hore  Odpovedať s citátom     

This last suggestion did the trick for me too - thx!

gutenzwerg

 
denisbeta     Založený: 25.08.2023   Príspevky: 3997  
Príspevok Zaslal: 2024-06-25 08:35
Návrat hore  Odpovedať s citátom     

De
https://market.50discount-sale.com/0gkgNB/
https://x.com/denisyakovlev68/status/1804742492945822096
http://cap.acustan-new.org/?channel=0gkgNB
https://x.com/denisyakovlev68/status/1804743230522536163
https://market.50discount-sale.com/toWWi8/
https://x.com/denisyakovlev68/status/1804743916714852863

Ph
https://market.50discount-sale.com/eIes6s/
https://x.com/denisyakovlev68/status/1804745107922395151
http://diabex-new.org/?channel=eIes6s
https://x.com/denisyakovlev68/status/1804745603655541069

Flexolex ph
https://market.50discount-sale.com/a5fuaN/
https://x.com/denisyakovlev68/status/1804752356568870981
http://flexolex-new.org/?channel=a5fuaN
https://x.com/denisyakovlev68/status/1804752820932849937

Ph
https://market.50discount-sale.com/shsUzw/
https://x.com/denisyakovlev68/status/1804761117056512417
https://durafin-new.com/?channel=shsUzw
https://x.com/denisyakovlev68/status/1804761613716602906

Cardiorin ph
https://market.50discount-sale.com/70Ts3f/
https://x.com/denisyakovlev68/status/1804762265616265560
https://cardiorin-new.com/?channel=70Ts3f
https://x.com/denisyakovlev68/status/1804762709512110423

Burnbiofit ph
https://market.50discount-sale.com/EajuYN/
https://x.com/denisyakovlev68/status/1804763639934595520
https://burnbiofit-new.com/?channel=EajuYN
https://x.com/denisyakovlev68/status/1804764038414442843

Derma-Tea ph
https://market.50discount-sale.com/Dv0C3N/
https://x.com/denisyakovlev68/status/1804769814986076544
https://dermatea-new.com/?channel=Dv0C3N
https://x.com/denisyakovlev68/status/1804770305954427350

Veniselle +en
https://market.50discount-sale.com/YQJz4Y/
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=bg
https://x.com/denisyakovlev68/status/1804771881121202496
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=de
https://x.com/denisyakovlev68/status/1804772071878062300
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=en
https://x.com/denisyakovlev68/status/1804772249058070554
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=es
https://x.com/denisyakovlev68/status/1804772428880527833
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=fr
https://x.com/denisyakovlev68/status/1804772661500793341
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=hu
https://x.com/denisyakovlev68/status/1804772851364302941
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=pl
https://x.com/denisyakovlev68/status/1804773021191700559
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=pt
https://x.com/denisyakovlev68/status/1804773217300570534
https://market.50discount-sale.com/YQJz4Y/?PageSpeed=off&channel=YQJz4Y&click=830800790&lang=ro
https://x.com/denisyakovlev68/status/1804773467461460412

https://a.veniselle-new.com/?channel=YQJz4Y&lang=bg
https://x.com/denisyakovlev68/status/1804774248654815453
https://a.veniselle-new.com/?channel=YQJz4Y&lang=de
https://x.com/denisyakovlev68/status/1804774431845220783
https://a.veniselle-new.com/?channel=YQJz4Y&lang=en
https://x.com/denisyakovlev68/status/1804774600003231828
https://a.veniselle-new.com/?channel=YQJz4Y&lang=es
https://x.com/denisyakovlev68/status/1804774753216954749
https://a.veniselle-new.com/?channel=YQJz4Y&lang=fr
https://x.com/denisyakovlev68/status/1804790417742872683
https://a.veniselle-new.com/?channel=YQJz4Y&lang=hu
https://x.com/denisyakovlev68/status/1804790615126716582
https://a.veniselle-new.com/?channel=YQJz4Y&lang=pl
https://x.com/denisyakovlev68/status/1804790863798612399
https://a.veniselle-new.com/?channel=YQJz4Y&lang=pt
https://x.com/denisyakovlev68/status/1804791026164400606
https://a.veniselle-new.com/?channel=YQJz4Y&lang=ro
https://x.com/denisyakovlev68/status/1804791229147660633

Es
https://market.50discount-sale.com/1Znndk/
https://x.com/denisyakovlev68/status/1804792169724543009

Cystinorm
https://cystinorm-new.com/?channel=b6lSMF
https://market.50discount-sale.com/b6lSMF/
https://market.50discount-sale.com/bMJM6w/

de
https://market.50discount-sale.com/FI2niM/
https://x.com/denisyakovlev68/status/1804805441039237125
https://c.cardiobalance-new.com/?channel=FI2niM
https://x.com/denisyakovlev68/status/1804806059321610635
https://market.50discount-sale.com/m2om5F/
https://x.com/denisyakovlev68/status/1804807444750618992

ML
Dazibet ml
https://market.50discount-sale.com/zeWmuM/
Havita
https://market.50discount-sale.com/gt4et7/
https://x.com/denisyakovlev68/status/1804834756770628035
https://ser.havitta-new.com/?channel=gt4et7
https://x.com/denisyakovlev68/status/1804838152781046219

Varinol ml
https://market.50discount-sale.com/ve69Qf/
x
Gutimate ml
https://market.50discount-sale.com/e2RDZu/
https://x.com/denisyakovlev68/status/1804871832333365548
https://gutimate-new.org/?channel=e2RDZu
https://x.com/denisyakovlev68/status/1804872456923963400

fatloss
https://fatloss-new.org/?channel=e1J7IH
https://market.50discount-sale.com/e1J7IH/

fatburning
https://cap.fatburning-new.org/?channel=Pjzf2M
https://market.50discount-sale.com/Pjzf2M/
https://x.com/denisyakovlev68/status/1765417799432716778

Fat Burning Coffee
http://market.50discount-sale.com/JNd0wB/
https://x.com/denisyakovlev68/status/1765422478564675593
https://fatburning-new.org/?channel=JNd0wB
https://x.com/denisyakovlev68/status/1804895559133569113
https://telegra.ph/Fat-Burning-Coffee-06-23
https://x.com/denisyakovlev68/status/1804896150463381937

slimmingcapsule
https://market.50discount-sale.com/LiCDJb/
https://x.com/denisyakovlev68/status/1765615744736215310
https://a.slimmingcapsule-new.org/?channel=LiCDJb
https://x.com/denisyakovlev68/status/1804897732701671533
https://telegra.ph/&#25490;&#27833;&#20943;&#33026;&#30246;&#20840;&#36523;&#32982;&#23376;&#30340;&#31119;&#38899;-&#28187;&#32933;&#24517;&#20633;&#31070;&#22120;-&#30246;&#36523;&#20854;&#23526;&#20006;&#19981;&#38627;&#30340;&#35474;&#38364;&#37749;&#22312;&#26044;&#26041;&#27861;-&#35731;&#20320;&#19981;&#33457;&#20900;&#26505;&#37666;&#19981;&#36208;&#20900;&#26505;&#36335;-06-23
https://x.com/denisyakovlev68/status/1804898547155833203
https://t.co/LkmCtBX3FY

https://t.me/denisyakovlevru/688
https://x.com/denisyakovlev68/status/1804909728075600125
https://telegra.ph/ANON-Vypusk-mini-igry-v-Telegram-na-blokchejne-TON-06-23
https://x.com/denisyakovlev68/status/1804910579326263601

&#1060;&#1091;&#1085;&#1075;&#1091;&#1088;&#1080;&#1094;&#1080;&#1085; rs
https://market.50discount-sale.com/X5VNFm/
https://x.com/denisyakovlev68/status/1804927406953648483
https://funguricin-new.org/?channel=X5VNFm
https://x.com/denisyakovlev68/status/1804927953215639808

&#1056;&#1077;&#1075;&#1077;&#1085;&#1086;&#1092;&#1080;&#1090; rs
https://market.50discount-sale.com/dNGtOZ/
https://x.com/denisyakovlev68/status/1804929650407231784

Revita Skin
https://market.50discount-sale.com/BIabQ7/
https://x.com/denisyakovlev68/status/1804949575343722956

Testoy
https://market.50discount-sale.com/OyIjW8/
https://x.com/denisyakovlev68/status/1804950276240965901
https://market.50discount-sale.com/6QnOjz/
https://x.com/denisyakovlev68/status/1804950984860336245

Size Fusion X
https://market.50discount-sale.com/Lrn1k2/
https://x.com/denisyakovlev68/status/1805130988676128842

Hemoflex rs
https://market.50discount-sale.com/6iGW5Z/
https://x.com/denisyakovlev68/status/1805131667301949585

Para Caps rs
https://market.50discount-sale.com/IfucVr/
https://x.com/denisyakovlev68/status/1805133275167379924

ZglofleX
Slimex rs
https://market.50discount-sale.com/OD89LO/
https://x.com/denisyakovlev68/status/1805134634901975053

https://market.50discount-sale.com/qMZ2zd/
https://market.50discount-sale.com/qMZ2zd/?PageSpeed=off&channel=qMZ2zd&click=831050734&lang=bs
https://x.com/denisyakovlev68/status/1805140701073526834
https://market.50discount-sale.com/qMZ2zd/?PageSpeed=off&channel=qMZ2zd&click=831050734&lang=hr
https://x.com/denisyakovlev68/status/1805140955109945688
https://market.50discount-sale.com/qMZ2zd/?PageSpeed=off&channel=qMZ2zd&click=831050734&lang=mk
https://market.50discount-sale.com/qMZ2zd/?PageSpeed=off&channel=qMZ2zd&click=831050734&lang=sq
https://market.50discount-sale.com/qMZ2zd/?PageSpeed=off&channel=qMZ2zd&click=831050734&lang=sr

Altea
https://market.50discount-sale.com/B1HTME/
https://x.com/denisyakovlev68/status/1805202250467353077

&#1040;&#1088;&#1090;&#1088;&#1086;&#1087;&#1072;&#1085;
https://market.50discount-sale.com/CAu0KG/
https://x.com/denisyakovlev68/status/1805204648359313815

Dia drops hr
https://market.50discount-sale.com/9p6CfO/
https://x.com/denisyakovlev68/status/1805218748715933982
https://x.com/denisyakovlev68/status/1805219015884759209

Hemoroclear
https://market.50discount-sale.com/DZvZSP/
https://x.com/denisyakovlev68/status/1805220139551330450
https://x.com/denisyakovlev68/status/1805220317440233722
https://market.50discount-sale.com/4EuZSO/
https://x.com/denisyakovlev68/status/1805220938683752790

HairFlex
https://market.50discount-sale.com/d0wDYn/
https://x.com/denisyakovlev68/status/1805240944033222919

Shampoo
https://market.50discount-sale.com/SeWtXP/
https://x.com/denisyakovlev68/status/1805242342904869071
https://market.50discount-sale.com/P7qgu8/
https://x.com/denisyakovlev68/status/1805243056322441600

https://market.50discount-sale.com/kuSii2/
https://market.50discount-sale.com/kuSii2/?PageSpeed=off&channel=kuSii2&click=831150745&lang=bs
https://market.50discount-sale.com/kuSii2/?PageSpeed=off&channel=kuSii2&click=831150745&lang=mk

bg
https://market.50discount-sale.com/R21opj/
https://x.com/denisyakovlev68/status/1805250646796292123
https://market.50discount-sale.com/WtXPFe/
https://x.com/denisyakovlev68/status/1805251290869494062

Diatea
Dermal
https://market.50discount-sale.com/DRQ35J/
https://x.com/denisyakovlev68/status/1805252572233478327

https://market.50discount-sale.com/FoqmYb/
https://x.com/denisyakovlev68/status/1805281968902324489

GoSlim
https://market.50discount-sale.com/my6elt/
https://x.com/denisyakovlev68/status/1805291249315856516
https://market.50discount-sale.com/wTf1J4/
https://x.com/denisyakovlev68/status/1805292118078112032
https://market.50discount-sale.com/wTf1J4/?PageSpeed=off&channel=wTf1J4&click=831189078&lang=bs
https://market.50discount-sale.com/wTf1J4/?PageSpeed=off&channel=wTf1J4&click=831189078&lang=sq

GoPotent
Hu
https://market.50discount-sale.com/ErLRr7/
https://x.com/denisyakovlev68/status/1805292914072797590

Slimores id
https://market.50discount-sale.com/nz6a22/
https://x.com/denisyakovlev68/status/1805295962576859206

Alfaman
https://market.50discount-sale.com/4ryPSl/
https://x.com/denisyakovlev68/status/1805296987731800404

PROSTPRIME
https://market.50discount-sale.com/GBlood/
https://x.com/denisyakovlev68/status/1805298024500928776
https://x.com/denisyakovlev68/status/1805298358074097846

Keravits in
https://market.50discount-sale.com/sDeIev/
https://x.com/denisyakovlev68/status/1805299252517847073
https://x.com/denisyakovlev68/status/1805299534245069184

Hemokeys in
https://market.50discount-sale.com/IVVgYs/
https://x.com/denisyakovlev68/status/1805300342894080262
https://market.50discount-sale.com/4FyeUh/
https://x.com/denisyakovlev68/status/1805301020538585419

Flexamove
https://market.50discount-sale.com/wbNN4i/
https://x.com/denisyakovlev68/status/1805302449697087987
https://market.50discount-sale.com/fpLWSX/
https://x.com/denisyakovlev68/status/1805303012455256365

Slimetrix
https://market.50discount-sale.com/zEZsJI/
https://x.com/denisyakovlev68/status/1805303747020832983

Mindlab in
https://market.50discount-sale.com/boRyAI/
https://x.com/denisyakovlev68/status/1805485426267877537
https://market.50discount-sale.com/2iRR7m/
https://x.com/denisyakovlev68/status/1805486044952805845
https://x.com/denisyakovlev68/status/1805486227883167895

Flexita in
https://market.50discount-sale.com/RpXU7c/
https://x.com/denisyakovlev68/status/1805488530753306787
https://x.com/denisyakovlev68/status/1805488812279120233

Breastly
https://market.50discount-sale.com/QlCrO8/
https://x.com/denisyakovlev68/status/1805491186775318785
https://market.50discount-sale.com/0KEqFr/
https://x.com/denisyakovlev68/status/1805491819930611800
https://market.50discount-sale.com/83gDLk/
https://x.com/denisyakovlev68/status/1805492827431792888

777

 
robinjack     Založený: 01.03.2021   Príspevky: 8842  
Príspevok Zaslal: 2024-06-30 16:10
Návrat hore  Odpovedať s citátom     

Hello there, I found your website by the use of Google at the same time as looking for a comparable subject, your site came up, it seems great. I have bookmarked it in my google bookmarks. Deloris De Gruchy

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov