dotProject Forums
Google
 

Go Back   dotProject Forums > USAGE, TIPS AND HINTS > General Questions
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

General Questions Use this forum to ask questions or provide suggestions about general usage and how to's within the core dotProject modules. These modules include: Calendar, Tasks and Projects, Files, Contacts, Permissions, Forums, User Administration, System Administration etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 23-04-07, 04:19 PM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default dotProject 2.1 RC1 UTF-8 Traditional/Simplified Chinese Support based on CVS 20070423

Hi All:

I just released a version that based on CVS 20070423 to support both Tradition and Simplified Chinese.

It can shows Chinese in Calendar & Gantt without any problem.

I also fix some small bugs for dotProject 2.1 RC1 and also update the jpgraph and utf-8(I borrow it from dokuwiki) library.

Please follow the link dotProject 2.1 RC 1 for UTF-8 Traditional & Simplified Chinese

I'll post the patch to mantis in later of today or tomorow.

I think it can help other multi-byte(CJK) users to use dotProject without any problem.

Mark


Last edited by markwu : 23-04-07 at 08:14 PM. Reason: Title Change
Reply With Quote
  #2  
Old 24-04-07, 04:02 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

If you using PHP4, please down load a patch file for dotProject 2.1 RC1 20070423 here:

jpgraph_setfonthelper.zip

Unzip and replace the jpgraph_setfonthelper.php under ./dotproject/lib/jpgraph/src

Mark

Reply With Quote
  #3  
Old 25-04-07, 11:32 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Hi All:

Here comes the zip file for "different files only" based on CVS 20070423. You can download it from here:

dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu_Patch_File_only.zip

So, how to install ths "different files only" with version?

1. check out the dotproject soruce code from dotproject CVS repository stable_2 branch.

2. Delete jpgraph under ./dotproject/lib/jpgraph (This is a very old version, so just delete it)

3. Uncompress the zip file and replace all existing files.

That's all, you will see what I modified for dotproject to make it work for multi-byte environment.

Mark

Reply With Quote
  #4  
Old 25-04-07, 11:45 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Okay, if you don't like the "different file only" package, then you can consider download the whole package that I mentoned above, or you can try "this diff file only" package to make your own:

dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu_Diff_File_only.zip

How to install this "diff file only" package?

1. You still need this file:dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu_Patch_File_only.zip.

2. Check out the most update dotproject source code from cvs branch stabe_2

3. Unzip dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu_Diff_File_only.zip and use gnu patch to patch the modification to stable_2 branch in your local directory

4. Unzip dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu_Diff_File_only.zip and copy ./lib/jpgraph, ./lib/utf8 and ./locales to replace the same folder in stable_2 branch in your local directory

** I will suggest delete the /lib/jpgraph in yout stable_2 branch before you replace it.

5. That's all.

Mark

Reply With Quote
  #5  
Old 25-04-07, 11:52 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Danm.... seems I forgot to post the whole package link here. Sorry ...

You can follow the link to get the whole package, if you don't like to patch by your self:

dotProject_2.1_RC1_20070423_UTF-8_Chinese_by_Markwu.zip

And your can get more information here, if you prefer Chinese : dotProject 2.1 RC1 UTF-8 Chinese released (both Simplified and Traditional Chinese)

BTW, I already test this release under Windows/Linux and PHP4/PHP5 seems all works well. Please kindly report bugs here or in my personal forum Mark's Boring Forum. I'll fix the bug and commit back to development team.

Mark

Reply With Quote
  #6  
Old 25-04-07, 12:11 PM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Okay, now I think I have to explain what I did to make it work for mult-byte environment:

1. UTF-8 Fix:

I add a new lib utf8 from dokuwiki, it can handle utf-8 without any problem. So it can help me to get rid off those Chinese character that messed up by utf8_encode() and utf8_decode.

You can see I use it in many place.

2. Locale calendar fix.

It is becasue the PEAR:: DATE does not support locale well. So, I have to make some modification to /lib/PEAR/Date/Calc.php.

And add a new global variable $locale in /locale/zh_TW/locale.php file to define the string for normal name and short name for weekday and month. It looks like:

PHP Code:
$locale['days'] = Array( 'Sunday''Monday''Tuesday''Wednesday''Thursday''Friday''Saturday' ) ;
$locale['daysshort'] = Array( 'Su''Mo''Tu''We''Th''Fr''Sa' ) ;
$locale['months']= Array( 'January''February''March''April''May''June''July''August''September''October''November''December' ) ;
$locale['monthsshort'] = Array( 'Jan''Feb''Mar''Apr''May''Jun''Jul''Aug''Sep''Oct''Nov''Dec' ) ; 
It can avoid the PEAR:: DATE to mess up Chinese characters.

3. Gantt Chart

The same problem with PEAR:: DATE. I just download the newset jpgraph version from offifical jpgraph site, and made some modification.

And, I also add a new $locale['font'] = FF_CHINESE to define which font I should use when I use Chinese.

Then, I have to modify all gantt.php where use the setFont method, I replace it with my own fontHandler ./lib/jpgraph/src/jpgraph_setfonthelper.php to handle the setFont.

So, that's all.

** This modification only works for Multi-Byte with UTF-8 encoding, it doesn't support BIG-5 and GB2312.
** If you don't use Chinese in en environment, you can remove $locale['font'] inside ./locales/en/locale.php to get better font looking.
** Actuallt, this packacge also fix most gantt chart problem.

Mark

Reply With Quote
  #7  
Old 25-04-07, 12:19 PM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

I already submit a feature request in mantis to add this patch, please kindly follow this issue here:

http://www.dotproject.net/mantis/view.php?id=1981

Mark

Reply With Quote
  #8  
Old 01-05-07, 12:03 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Hi:

To anyone who cares about the dotProject runs runder UTF-8 multi-byte environment.

According to the discussion with dotProject developers (Karen & CyberHorse), they won't accept the patch becasue the patch modified the 3rd party libraries "PEAR :: Date" & "jpgraph".

I am still thinking how to fixed the multi-byte problems without modification of 3rd party libraries. But it is really a big challenges for me, becasue current dotProject framework lacks of some i18n features, like date, unit measure, locale-specific constant ....

So, I'll keep maintain the current implementation and syncronize the latest CVS stable_2 branch until I find another way to solve it.

You can use the SVN to get the latest patched package by me using the following commands:

svn co http://svn.openfoundry.org/dotproject/ ./your_dotproject_folder

And, I will also upload a zipped package to mantis http://www.dotproject.net/mantis/view.php?id=1981 in every major release.

If anyone have any ides can solve the mult-byte issues without change the 3rd-party libraries, please kindly let me know.

Thanks for Karen & CyberHorse's kindly feed back and reponse.

Mark

Reply With Quote
  #9  
Old 01-05-07, 12:10 AM
markwu markwu is offline
Valued Users
Frequent Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 21-06-05
Posts: 37
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

BTW, All logs are record in English, you can see them list here:

http://rt.openfoundry.org/Foundry/Pr...otproject/log/

Regards, Mark

Reply With Quote
  #10  
Old 01-05-07, 02:20 PM
cyberhorse's Avatar
cyberhorse cyberhorse is offline
Development Team Member
Utter Fanatic
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 19-04-04
Posts: 1,431
Default Re: dotProject 2.1 RC1 UTF-8 Chinese Support based on CVS 20070423

Thank YOU for respecting our opinion and continuing support on this issue.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 12:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.