FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » chinese post bug and generate pdf
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
chinese post bug and generate pdf [message #36390] Wed, 21 March 2007 02:59 Go to next message
xinhaozheng is currently offline  xinhaozheng   China
Messages: 4
Registered: March 2007
Karma: 0
Junior Member
Well,it can post most of the chinese character correctly,but some of these character would be ???.Is it a bug?Maybe caust by fud_wordwrap() function.

second:generate chinese post to pdf but the reader can not display it in chinese though it can read other chinese pdf doc correctly.
Re: chinese post bug and generate pdf [message #36425 is a reply to message #36390] Thu, 22 March 2007 23:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Try setting wordwrap setting to 0 or a very high number and see if that makes a difference.

FUDforum Core Developer
Re: chinese post bug and generate pdf [message #36429 is a reply to message #36425] Fri, 23 March 2007 01:10 Go to previous messageGo to next message
xinhaozheng is currently offline  xinhaozheng   China
Messages: 4
Registered: March 2007
Karma: 0
Junior Member
yes,it works now if i set wordwrap to zero.Thanks very much!
But,the second problem has not been solved yet!what i got when generate post to pdf:index.php?t=getfile&id=2904&private=0

maybe two problem need to be solved:

first,it can not display language other than english.

second,it can not auto break line when it got to the end of line except english.
Re: chinese post bug and generate pdf [message #36473 is a reply to message #36429] Sun, 25 March 2007 14:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
What charset is your forum using, is it UTF-8? It is possible PDF font does not support your charset.

FUDforum Core Developer
Re: chinese post bug and generate pdf [message #36488 is a reply to message #36473] Mon, 26 March 2007 05:30 Go to previous messageGo to next message
xinhaozheng is currently offline  xinhaozheng   China
Messages: 4
Registered: March 2007
Karma: 0
Junior Member
YES,I use UTF-8 charset.

I have put the message stored in file,not in DB.And I open the msg_1000 with eclipse it can be displayed ok.

And I have already tested that Chinese character can be display ok with Courier font in text editor.

I have tried to disabled or change the default pdf font,but i didn't know how to.

waiting for replay.thanks very much!
Re: chinese post bug and generate pdf [message #36513 is a reply to message #36488] Tue, 27 March 2007 00:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The Courier font in the editor is not the same as in PDF, which is why the issue maybe there.

FUDforum Core Developer
Re: chinese post bug and generate pdf [message #36514 is a reply to message #36513] Tue, 27 March 2007 00:55 Go to previous messageGo to next message
xinhaozheng is currently offline  xinhaozheng   China
Messages: 4
Registered: March 2007
Karma: 0
Junior Member
Thanks!So how can I solve the problem,making a new font? Or can you supply some solution?
Re: chinese post bug and generate pdf [message #36540 is a reply to message #36514] Fri, 30 March 2007 00:06 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I think your best bet is trying another PDF font for the generator.

FUDforum Core Developer
Odp: chinese post bug and generate pdf [message #36584 is a reply to message #36390] Sun, 01 April 2007 11:13 Go to previous messageGo to next message
kroku is currently offline  kroku   Poland
Messages: 30
Registered: July 2006
Karma: 0
Member
@Ilia
the only solution for such things is all languages (and posts) have to be converted to utf8 (i think its no problem) and at least one font with all Unicode symbols have to be embedded in forum installation (in adobe binary format)... Or include separate fonts for each used in different languages code-pages (Latin1, Latin2, iso-xxxx-xx, windows-xxxx, etc) corresponding to this languages.
unfortunately, current solution in forum makes almost impossible to add new fonts... I've tried to do this, no way
but when you include Unicode fonts in forum installation so they be able to be embedded also in pdf files, this solve problems with pdf in all languages different from English (English is very poor in signs, you used this to make pdf generator as small as possible, but it causes pdf generator is incompatible with almost all other languages. I hope you understand it at last)

I'm not good in English so i hope it is understandable Wink

[Updated on: Sun, 01 April 2007 11:16]

Report message to a moderator

Re: Odp: chinese post bug and generate pdf [message #36716 is a reply to message #36584] Sun, 01 April 2007 19:44 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Another option is to try and convert the text using iconv() to big-5 or similar encoding that perhaps is better interpreted by the included fonts.

FUDforum Core Developer
Odp: chinese post bug and generate pdf [message #36779 is a reply to message #36390] Mon, 09 April 2007 13:35 Go to previous message
kroku is currently offline  kroku   Poland
Messages: 30
Registered: July 2006
Karma: 0
Member
It seems yes, but...
$txt = iconv("ISO-8859-2","ISO-8859-1",$txt);
doesn't save signs like ±êæñ¼¿ó³¡ÊÆѬ¯Ó£ (<- If you can't see them change browser settings to ISO-8859-2). This signs exists in ISO-8859-2 but they doesn't exists in ISO-8859-1 and Latin1 (I don't really know which is used by pdf generator) so it can't really work.

And the same about :
$txt = iconv("UTF-8","ISO-anything",$txt);
It may not work. It can't save all unicode symbols.

So the only solution is: pdf generator have to suupport UTF-8 because:
$txt = iconv("","UTF-8",$txt);
works always and keeps all symbols/signs, etc...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Existing FUDforum on a new domain
Next Topic: Identification of authors
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 04 09:36:29 GMT 2024

Total time taken to generate the page: 0.02105 seconds