Re: [PHP] is there any setting to declare the member variables in constructor?

2010-03-29 Thread solo hsi
sure, i know fpdf can deal with asian character like Chinese, but it
can't work with utf-8 charactor so that i have to replace it with
tcpdf.

On Mon, Mar 29, 2010 at 8:14 PM, Richard Quadling
rquadl...@googlemail.com wrote:
 On 27 March 2010 17:50, solo hsi xzy...@gmail.com wrote:
 now i'm re-writing some script to output pdf files. the original code
 is based on fpdf, but as you know, fpdf can't deal with the characters
 in utf8.

 From http://www.fpdf.org/?lang=en

 What languages can I use?

 The class can produce documents in many languages other than the
 Western European ones: Central European, Cyrillic, Greek, Baltic and
 Thai, provided you own TrueType or Type1 fonts with the desired
 character set. Chinese, Japanese and Korean are supported too.

 So, if you have the font for it, you should be able to encode the data
 easily enough. No matter what encoding you are using, unless the font
 you want to use has a glyph for it, you can't use it. This is more
 often the problem I've found.

 Regards,

 Richard.
 --
 -
 Richard Quadling
 Standing on the shoulders of some very clever giants!
 EE : http://www.experts-exchange.com/M_248814.html
 EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 ZOPA : http://uk.zopa.com/member/RQuadling




-- 
solo(xzy...@gmail.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] is there any setting to declare the member variables in constructor?

2010-03-29 Thread solo hsi
i have done my work, replaced fpdf with tcpdf, just by using fpdi:)

On Tue, Mar 30, 2010 at 12:12 AM, Richard Quadling
rquadl...@googlemail.com wrote:
 On 29 March 2010 16:47, solo hsi xzy...@gmail.com wrote:
 sure, i know fpdf can deal with asian character like Chinese, but it
 can't work with utf-8 charactor so that i have to replace it with
 tcpdf.

 On Mon, Mar 29, 2010 at 8:14 PM, Richard Quadling
 rquadl...@googlemail.com wrote:
 On 27 March 2010 17:50, solo hsi xzy...@gmail.com wrote:
 now i'm re-writing some script to output pdf files. the original code
 is based on fpdf, but as you know, fpdf can't deal with the characters
 in utf8.

 From http://www.fpdf.org/?lang=en

 What languages can I use?

 The class can produce documents in many languages other than the
 Western European ones: Central European, Cyrillic, Greek, Baltic and
 Thai, provided you own TrueType or Type1 fonts with the desired
 character set. Chinese, Japanese and Korean are supported too.

 So, if you have the font for it, you should be able to encode the data
 easily enough. No matter what encoding you are using, unless the font
 you want to use has a glyph for it, you can't use it. This is more
 often the problem I've found.

 Regards,

 Richard.
 --
 -
 Richard Quadling
 Standing on the shoulders of some very clever giants!
 EE : http://www.experts-exchange.com/M_248814.html
 EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 ZOPA : http://uk.zopa.com/member/RQuadling




 --
 solo(xzy...@gmail.com)


 Aha! I see what you mean.

 http://www.fpdf.org/en/tutorial/tuto7.htm

 Uses an encoding and only allows 256 characters.

 Hmm.

 With regard to your issue, it sounds like the class is extended
 further or uses magic functions to set/get missing properties.

 --
 -
 Richard Quadling
 Standing on the shoulders of some very clever giants!
 EE : http://www.experts-exchange.com/M_248814.html
 EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
 Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
 ZOPA : http://uk.zopa.com/member/RQuadling




-- 
solo(xzy...@gmail.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Converting funky characters

2010-03-28 Thread solo hsi
i think you just need function urldecode()

On Mon, Mar 29, 2010 at 8:05 AM, Skip Evans s...@bigskypenguin.com wrote:
 Hey all,

 What's the best way to filter/convert characters that don't
 translate properly from say news stories to HTML?

 For example, I have a form that people cut and paste the lead
 in paragraph from news stories they want to link to from their
 sites to the original. And of course things like long dashes,
 double quotes, single quotes, etc, always translate is wacky
 unprintables when they are rendered, and the user needs to
 edit them to replace them with standard characters.

 Is there way to filter this text through a function that will
 convert them to web friendly chars?

 Thanks,
 Skip

 --
 
 Skip Evans
 PenguinSites.com, LLC
 503 S Baldwin St, #1
 Madison WI 53703
 608.250.2720
 http://penguinsites.com
 
 Those of you who believe in
 telekinesis, raise my hand.
  -- Kurt Vonnegut

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
solo(xzy...@gmail.com)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] is there any setting to declare the member variables in constructor?

2010-03-27 Thread solo hsi
now i'm re-writing some script to output pdf files. the original code
is based on fpdf, but as you know, fpdf can't deal with the characters
in utf8. so i want to change it to tcpdf. there is a class extend from
fpdf, in its constructor function, there is some script just like
$this-db = $db;. there isn't any variable named $db in parent
class(class fpdf) and child class, i have checked it carefully and
print_r($this) at the top of child's constructor function. but after
$this-db=$db, there is a member variable named $db(i have print_r
and check it too). when i change the parent class to tcpdf, although i
haven't change any code in child class and there isn't a member
variable named $db in parent class(class tcpdf), php returns me a
error TCPDF ERROR: Cannot access protected property / Undefined
property. i print_r($this) at the top of constructor function again
and check whether there is a member variable named $db in both parent
and child class, finally i'm sure there isn't. i think maybe there is
a setting in the parent class(fpdf/tcpdf) here about this condition.
it controls whether you can declare a member variable by equaling it.
i tried to find it out on google or in fpdf/tcpdf sources but i
failed, there are about 16k lines in tcpdf so i post this mail to
request some help, is there somebody have any experience about this
case? please help me, thanks a lot.
solo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php