php-general Digest 1 May 2013 08:53:12 -0000 Issue 8213

Topics (messages 320996 through 320997):

Re: [ask] convert unknown Korean's string to readable string
        320996 by: Morning Star
        320997 by: Richard Quadling

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hi Richard,
i am sure my KDE konsole is set to UTF-8. fortunately, i got a answer
from the Debian mailing list. someone told me to verify if i had
installed the ttf-baekmuk (Korean's font) or not. i see that it is not
install yet. i just installed it and then i am able to view the
Korean's font.
Thanks anyway.

Best regards,

Marco

On Tue, Apr 30, 2013 at 2:40 PM, Richard Quadling <rquadl...@gmail.com> wrote:
>
>
>
> On 29 April 2013 20:38, Morning Star <morning.star.c...@gmail.com> wrote:
>>
>> Thanks, Richard. It works in xterm, but it doesn't work in KDE konsole.
>> i don't know how to figure it out. help me
>>
>> Best regards,
>>
>> Marco
>>
>> On Mon, Apr 22, 2013 at 9:43 AM, Richard Quadling <rquadl...@gmail.com>
>> wrote:
>> >
>> > On 18 April 2013 08:06, Morning Star <morning.star.c...@gmail.com>
>> > wrote:
>> >>
>> >> $string = \uc548\ub155\ud558\uc138\uc694
>> >
>> >
>> > <?php
>> > $string1 = '\uc548\ub155\ud558\uc138\uc694';
>> > $string2 = preg_replace('/\\\u([0-9a-f]+)/', '&#x$1;', $string1);
>> > $string3 = html_entity_decode($string2, ENT_COMPAT, 'UTF-8');
>> > echo
>> >     'Original : ', $string1, PHP_EOL,
>> >     'Entities : ', $string2, PHP_EOL,
>> >     'Decoded  : ', $string3, PHP_EOL,
>> >     PHP_EOL;
>> > ?>
>> >
>> > outputs (at least for me) ...
>> >
>> > 안녕하세요
>> >
>> > Based upon
>> >
>> > http://stackoverflow.com/questions/7274183/php-convert-unicode-to-character.
>> >
>> >
>> > Hope this helps.
>> >
>> > --
>> > Richard Quadling
>> > Twitter : @RQuadling
>> >
>
>
>
> Can you show exactly what is produced?
>
> I'm guessing your KDE console is not set to UTF-8.
>
> I'm on a Mac, so I'm not able to help with that other than maybe
> http://www.linuxquestions.org/questions/linux-software-2/kde-and-utf8-276033/
>
>
> --
> Richard Quadling
> Twitter : @RQuadling

--- End Message ---
--- Begin Message ---
On 30 April 2013 18:56, Morning Star <morning.star.c...@gmail.com> wrote:

> Hi Richard,
> i am sure my KDE konsole is set to UTF-8. fortunately, i got a answer
> from the Debian mailing list. someone told me to verify if i had
> installed the ttf-baekmuk (Korean's font) or not. i see that it is not
> install yet. i just installed it and then i am able to view the
> Korean's font.
> Thanks anyway.
>
> Best regards,
>
> Marco
>
> On Tue, Apr 30, 2013 at 2:40 PM, Richard Quadling <rquadl...@gmail.com>
> wrote:
> >
> >
> >
> > On 29 April 2013 20:38, Morning Star <morning.star.c...@gmail.com>
> wrote:
> >>
> >> Thanks, Richard. It works in xterm, but it doesn't work in KDE konsole.
> >> i don't know how to figure it out. help me
> >>
> >> Best regards,
> >>
> >> Marco
> >>
> >> On Mon, Apr 22, 2013 at 9:43 AM, Richard Quadling <rquadl...@gmail.com>
> >> wrote:
> >> >
> >> > On 18 April 2013 08:06, Morning Star <morning.star.c...@gmail.com>
> >> > wrote:
> >> >>
> >> >> $string = \uc548\ub155\ud558\uc138\uc694
> >> >
> >> >
> >> > <?php
> >> > $string1 = '\uc548\ub155\ud558\uc138\uc694';
> >> > $string2 = preg_replace('/\\\u([0-9a-f]+)/', '&#x$1;', $string1);
> >> > $string3 = html_entity_decode($string2, ENT_COMPAT, 'UTF-8');
> >> > echo
> >> >     'Original : ', $string1, PHP_EOL,
> >> >     'Entities : ', $string2, PHP_EOL,
> >> >     'Decoded  : ', $string3, PHP_EOL,
> >> >     PHP_EOL;
> >> > ?>
> >> >
> >> > outputs (at least for me) ...
> >> >
> >> > 안녕하세요
> >> >
> >> > Based upon
> >> >
> >> >
> http://stackoverflow.com/questions/7274183/php-convert-unicode-to-character
> .
> >> >
> >> >
> >> > Hope this helps.
> >> >
> >> > --
> >> > Richard Quadling
> >> > Twitter : @RQuadling
> >> >
> >
> >
> >
> > Can you show exactly what is produced?
> >
> > I'm guessing your KDE console is not set to UTF-8.
> >
> > I'm on a Mac, so I'm not able to help with that other than maybe
> >
> http://www.linuxquestions.org/questions/linux-software-2/kde-and-utf8-276033/
> >
> >
> > --
> > Richard Quadling
> > Twitter : @RQuadling
>

Of course! Glad to have helped.

-- 
Richard Quadling
Twitter : @RQuadling

--- End Message ---

Reply via email to