|
Re: utf-8 problem: msg#00144web.wiki.pmwiki.user
Sure. Just change the value of $Newline in local.php to be some other character or character sequence that won't conflict with the UTF-8 character set and won't occur in normal markup text. This may require rewriting some of the data files to replace $Newline with the new character sequence; let me know if you want some help doing that. I was never really happy with the choice of \xB2 (\262) to store the newlines but at the time I wrote it I didn't have a good alternative. I would not be opposed to switching to a new value (and having a mechanism to convert/support the old value in existing installations) if someone can suggest a good one. Pm On Sun, Jun 29, 2003 at 09:32:06AM +0800, Dave Land wrote: > Hi, > > I'am a pmwiki user run http://www.antsight.com/project. Charset is set to > utf-8 to display chinese word. But there is a problem to display word with > 'B2' in it like 'U+80B2:E882B2'?? > > This is because pmwiki use '\xB2' as the linefeed. > > $grep -w Newline pmwiki.php > > pmwiki.php:$Newline = "\262"; > pmwiki.php: { return str_replace("\n",$GLOBALS["Newline"],$str); } > pmwiki.php: global $WikiDir,$Newline; > pmwiki.php: fputs($oldfp,str_replace($Newline,"\n",$oldtext)); > pmwiki.php: fputs($newfp,str_replace($Newline,"\n",$newtext)); > pmwiki.php: global $WikiDir,$Newline; > pmwiki.php: fputs($txtfp,str_replace($Newline,"\n",$page['text'])); > pmwiki.php: fputs($patfp,str_replace($Newline,"\n",$v)); > pmwiki.php: global > $Newline,$KeepToken,$LinkToken,$LinkPatterns,$ImgExtPattern, > pmwiki.php: $text = str_replace($Newline,"\n",$text); > pmwiki.php: global $Newline,$HandleEditFmt,$restore; > pmwiki.php: $text = str_replace($Newline,"\n",$text); > pmwiki.php: $TimeFmt,$PageFileFmt,$Newline,$DiffKeepDays; > pmwiki.php: if (str_replace($Newline,"\n",$new['text'])== > pmwiki.php: str_replace($Newline,"\n",$page['text'])) > pmwiki.php: preg_replace("%\\* ".preg_quote($pgname)." > .*?$Newline%","", > pmwiki.php: global $Newline; > pmwiki.php: $text = str_replace($Newline,"\n",$page['text']); > pmwiki.php: global $TimeFmt,$Newline,$PageDiffFmt,$PageDiffFootFmt; > pmwiki.php: $difflines = explode($Newline,$v.$Newline); > pmwiki.php: PrintText($pagename,join($Newline,$in)); > pmwiki.php: PrintText($pagename,join($Newline,$out)); > pmwiki.php: PrintText($pagename,join($Newline,$in)); > pmwiki.php: PrintText($pagename,join($Newline,$out)); > > I find the a GB2312 guide > (http://www.chinix.net/docs/modules/newbb/viewtopic.php?topic_id=3&forum=9&jump=1) > to solve partial problem, it need to update exist articls, and not work with > utf-8. Could we have a better solution? > > Best Regards, > > Dave Land > ================================================== > land@xxxxxxxxxxxx > 2003-06-29 > > > > _______________________________________________ > Pmwiki-users mailing list > Pmwiki-users@xxxxxxxxxxxx > http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | utf-8 problem: 00144, Dave Land |
|---|---|
| Next by Date: | system load?: 00144, Joris |
| Previous by Thread: | utf-8 problemi: 00144, Dave Land |
| Next by Thread: | system load?: 00144, Joris |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |