| View previous topic :: View next topic |
| Author |
Message |
sam2kb da ruski mafia
Joined: 02 Dec 2007 Posts: 2927
   votes: 53
|
Posted: Sat Dec 29, 2007 21:29 Post subject: Unicode charset (UTF-8) in b2evo |
|
|
You may also want to read this post: HOW-TO: Configure b2evolution for non-English posts
Unicode charset (UTF-8) in b2evo
1. Go to phpMyAdmin to create a database and set up its collation to utf8_unicode_ci.
2. Find and edit this strings in /conf/_locales.php
| PHP: |
$force_io_charset_if_accepted = 'utf-8';
$db_config['connection_charset'] = 'utf8';
|
3. Install b2evo in this database.
This is it, but if you want to use another language by default, you need to make some more changes
4. Download a language pack, unzip and upload it to /locales directory.
5. Now go to Backoffice -> Global Settings -> Regional and change Default locale. Then change Blog locale in Blog settings >YOUR BLOG > Global
If you want to switch an existing b2evo database to use UTF-8 (when you upgrade it) do the following
1. Buckup you database! And upgrade b2evo.
2. Then you need to change collation from old to utf8_unicode_ci in each table. You have options to:
a) Run SQL query
b) Export your database in SQL format, open it in text editor and use find/replace.
c) Go to phpMyAdmin and do it manually.
Last edited by sam2kb on Thu Oct 30, 2008 10:20; edited 5 times in total |
|
| Back to top |
|
 |
fplanque Core Developer

 Joined: 13 Jun 2003 Posts: 863
   votes: 9
|
Posted: Wed Apr 16, 2008 12:44 Post subject: |
|
|
It may be time to reconsider that part of b2evo by now.
Do you guys think we should make it all UTF-8 by default?
1) should the mysql tables be created as UTF-8 by default? (I believe most new users will have mysql servers that actually do support utf-8)
2) should we automatically upgrade all databases to UTF-8 in a future release? (might be tricky, I don't know)
3) should we convert all language packs to UTF-8 or at least have an UTF-8 version for each?
4) should we actually discard any language packs that are not UTF8 ?
5) should we make b2evo use UTF8 internally by default, although about 40% to 60% (not really sure yet) of the servers out there do not have the MB_STRING extension installed and therefore will not be able to handle NON ASCII text properly. That means if you blog in english you don't really care about not having MB_STRING, but if you blog with non ascii chars you may need to battle with your host or even switch to another host just to get mb_string.
What do you think? _________________ François - Rambling on... State of the Evolution - fplanque.com
b2evolution project maintainer / main developer
Follow b2evolution on twitter and become a fan of b2evolution on facebook |
|
| Back to top |
|
 |
sam2kb da ruski mafia
Joined: 02 Dec 2007 Posts: 2927
   votes: 53
|
Posted: Wed Apr 16, 2008 15:08 Post subject: |
|
|
I think there should be a checkbox or something, when it checked user can install/upgrade using UTF-8 (1,2,5)
And of course when he install using UTF-8 there must be a UTF-8 version available of all 2.x language packs. _________________ Russian b2evolution | Download |
|
| Back to top |
|
 |
deljr New Poster

Joined: 18 Aug 2008 Posts: 14
  
|
Posted: Wed Aug 20, 2008 12:27 Post subject: |
|
|
Even after running script fixcharset.php mentioned in http://forums.b2evolution.net/...hp?t=13366, I had to manually reset some of the values in the database, specifically:
| Code: |
evo_antispam
aspm_string
evo_items__item
post_content
post_title
post_urltitle
post_url
post_excerpt
evo_items__prerendering
itpr_renderers
itpr_content_prerendered
evo_comments
comment_author
comment_content |
I've posted the details of how I got b2e to work with utf-8 for bilingual Russian-English posting here. |
|
| Back to top |
|
 |
Walter Hooked :)

 Joined: 11 May 2004 Posts: 416
  votes: 5
|
Posted: Mon Sep 01, 2008 10:43 Post subject: |
|
|
For fplanque questions, I think:
1 - Yes
2 - Yes
3 - A UTF-8 version of language packs
4 - No, for a while
5 - This is complicated, but I vote yes too. _________________ []'s
- Walter
http://b2evolution.waltercruz.com |
|
| Back to top |
|
 |
Laibcoms Expert

Joined: 27 Feb 2006 Posts: 649
  votes: 9
|
Posted: Wed Mar 11, 2009 1:54 Post subject: |
|
|
| fplanque wrote: |
It may be time to reconsider that part of b2evo by now.
Do you guys think we should make it all UTF-8 by default? |
A strong YES!
| fplanque wrote: |
| 1) should the mysql tables be created as UTF-8 by default? (I believe most new users will have mysql servers that actually do support utf-8) |
A resounding YES!!
| fplanque wrote: |
| 2) should we automatically upgrade all databases to UTF-8 in a future release? (might be tricky, I don't know) |
A whisper of "no". This might break existing installations. IMO, make it as an option with a strong warning of what might happen, and that they should back-up first before attempting an upgrade-conversion.
| fplanque wrote: |
| 3) should we convert all language packs to UTF-8 or at least have an UTF-8 version for each? |
IMO, all language packs must be UTF-8. With non-unicode version as an "alternative option".
| fplanque wrote: |
| 4) should we actually discard any language packs that are not UTF8 ? |
Same as #3 above.
| fplanque wrote: |
| 5) should we make b2evo use UTF8 internally by default, although about 40% to 60% (not really sure yet) of the servers out there do not have the MB_STRING extension installed and therefore will not be able to handle NON ASCII text properly. That means if you blog in english you don't really care about not having MB_STRING, but if you blog with non ascii chars you may need to battle with your host or even switch to another host just to get mb_string. |
Probably by now, 2009, more servers are supporting Unicode across the board, since it is now the thrust by almost all websites and CMS/Blogs platforms today. It also makes translations easier and well, if one wants to capture non-English end-users, then that platform and server must support Unicode.
| fplanque wrote: |
| What do you think? |
Change b2evolution, starting from v3.0 to use Unicode by default. From the posts/locale, to the DB-table creation, to the DB Connection, to the files (php/html/css) being saved as UTF-8 (however, no BOM [BOM is required only on UTF-16 and UTF-32]).
When it comes to locale/translations, the main thrust of all language packs from b2evo v3 should be unicode, particularly UTF-8 (IMO, we dont really need UTF-16 and UTF-32 yet). If there is a request of a non-unicode language pack, then that's the only time that version should be provided - with a specific note that it is better to use Unicode today.
Finally, b2evolution will be able to capture more users in non-English nations like China, Japan, and Korea - where blogging is huge - surpasses the rest of the world combined. (Okay, I maybe exaggerating ) _________________ Theme Conversions for v3.x
Follow me @jcsesecuneta Blog: Snow World; gameshogun; ASEAN: Asia's Perfect 10
OS: Ubuntu GNU/Linux |
|
| Back to top |
|
 |
yakogg Muppet
Joined: 29 May 2010 Posts: 2  
|
Posted: Sat May 29, 2010 8:30 Post subject: |
|
|
thank you very much Laibcoms.
*edit : spammers are so unimaginative, your crap removed |
|
| Back to top |
|
 |
|