Loading ...
Sorry, an error occurred while loading the content.

I have problem in displaying special characte rs 6 char's (œ, Œ , … , etc ) in textarea on webpage

Expand Messages
  • Shiva Kumar Mallikarjun
    Hi, i have problem in displaying special characters(œ, Œ , … , etc ) in textarea in a page which are turned into ? mark instead of special char s. My html
    Message 1 of 4 , Aug 17, 2009
    • 0 Attachment
      Hi,



      i have problem in displaying special characters(œ, Œ , … , etc ) in
      textarea in a page which are turned into ? mark instead of special
      char's.



      My html page is in utf-8 and also DB column collation is utf8 ... if i
      go directly to DB and enter these special char they shown good in DB
      but not in my textarea (shown some funny char's instead of œ, Œ , …)

      I used $str = str_replace("œ","œ",$description[$i]); ...but its not at all detecting œ special char....it just turns into ? mark .



      what action i've to take before entering these special into DB and displaying in the textarea.



      Thanks,

      Shiva











      See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

      [Non-text portions of this message have been removed]
    • mithun mandal
      try use this. function encode_lang($txt){ $phptag = array( = ); return
      Message 2 of 4 , Aug 17, 2009
      • 0 Attachment
        try use this.

        function encode_lang($txt){
        $phptag = array('<' =>'<', '>' => '>');
        return strtr(htmlentities(stripcslashes($txt),ENT_NOQUOTES,'iso-8859-1'),$phptag);
        }




        ________________________________
        From: Shiva Kumar Mallikarjun <shivakumar_rnm@...>
        To: shivakumar_rnm@...
        Sent: Monday, 17 August, 2009 1:57:07 PM
        Subject: [bang-phpug] I have problem in displaying special characters 6 char's (œ, Œ , … , etc ) in textarea on webpage




        Hi,

        i have problem in displaying special characters(œ, Œ , … , etc ) in
        textarea in a page which are turned into ? mark instead of special
        char's.

        My html page is in utf-8 and also DB column collation is utf8 ... if i
        go directly to DB and enter these special char they shown good in DB
        but not in my textarea (shown some funny char's instead of œ, Œ , …)

        I used $str = str_replace( "œ","œ ",$description[ $i]); ...but its not at all detecting œ special char....it just turns into ? mark .

        what action i've to take before entering these special into DB and displaying in the textarea.

        Thanks,

        Shiva










        See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz yahoo.com/

        [Non-text portions of this message have been removed]





        Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/

        [Non-text portions of this message have been removed]
      • Shiva Kumar Mallikarjun
        Hi Mithun, Thanks for ur reply ... i wrote like this , public function encode_lang($txt)     {         $phptag = array( œ = œ , … = … );
        Message 3 of 4 , Aug 17, 2009
        • 0 Attachment
          Hi Mithun,

          Thanks for ur reply ...

          i wrote like this ,

          public function encode_lang($txt)
              {
                  $phptag = array('œ' =>'œ', '…' => '…');
                  return strtr(htmlentities((stripcslashes($txt)),ENT_NOQUOTES, 'iso-8859-1'),$phptag) ;
              }

          am calling like this

          $description[$i] = $this->encode_lang($description[$i]);
          $d->setDescription(stripslashes(utf8_decode($description[$i])));


          if i enter
          testing évoque œ …

          in  text area it is displayed as
          testing évoque Å" …

          in DB Coulmn
          testing évoque œ …

          I dont know wht is happening ....

          there are 6 special charatcter am nt able to handle them ...thy turn ? mark .

          any help would be appreciated .

          Thanks


          --- On Mon, 17/8/09, mithun mandal <mandal.mithun@...> wrote:

          From: mithun mandal <mandal.mithun@...>
          Subject: Re: [bang-phpug] I have problem in displaying special characters 6 char's (œ, Œ , … , etc ) in textarea on webpage
          To: bang-phpug@yahoogroups.com
          Date: Monday, 17 August, 2009, 9:28 AM






           





          try use this.



          function encode_lang( $txt){

          $phptag = array('<' =>'<', '>' => '>');

          return strtr(htmlentities( stripcslashes( $txt),ENT_ NOQUOTES, 'iso-8859- 1'),$phptag) ;

          }



          ____________ _________ _________ __

          From: Shiva Kumar Mallikarjun <shivakumar_rnm@ yahoo.com>

          To: shivakumar_rnm@ yahoo.com

          Sent: Monday, 17 August, 2009 1:57:07 PM

          Subject: [bang-phpug] I have problem in displaying special characters 6 char's (œ, Œ , … , etc ) in textarea on webpage



          Hi,



          i have problem in displaying special characters(œ, Œ , … , etc ) in

          textarea in a page which are turned into ? mark instead of special

          char's.



          My html page is in utf-8 and also DB column collation is utf8 ... if i

          go directly to DB and enter these special char they shown good in DB

          but not in my textarea (shown some funny char's instead of œ, Œ , …)



          I used $str = str_replace( "œ","œ ",$description[ $i]); ...but its not at all detecting œ special char....it just turns into ? mark .



          what action i've to take before entering these special into DB and displaying in the textarea.



          Thanks,



          Shiva



          See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz. yahoo.com/



          [Non-text portions of this message have been removed]



          Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads. yahoo.com/ in/internetexplo rer/



          [Non-text portions of this message have been removed]





























          See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

          [Non-text portions of this message have been removed]
        • Shiva Kumar Mallikarjun
          Thanks Mithun and All , I ve solved problem by doing this way, $d- setDescription(stripslashes(utf8_decode(addslashes(htmlentities($description[$i],
          Message 4 of 4 , Aug 17, 2009
          • 0 Attachment
            Thanks Mithun and All ,

            I've solved problem by doing this way,

            $d->setDescription(stripslashes(utf8_decode(addslashes(htmlentities($description[$i], ENT_QUOTES, 'UTF-8')))));



            --- On Mon, 17/8/09, mithun mandal <mandal.mithun@...> wrote:

            From: mithun mandal <mandal.mithun@...>
            Subject: Re: [bang-phpug] I have problem in displaying special characters 6 char's (œ, Œ , … , etc ) in textarea on webpage
            To: bang-phpug@yahoogroups.com
            Date: Monday, 17 August, 2009, 9:28 AM






             





            try use this.



            function encode_lang( $txt){

            $phptag = array('<' =>'<', '>' => '>');

            return strtr(htmlentities( stripcslashes( $txt),ENT_ NOQUOTES, 'iso-8859- 1'),$phptag) ;

            }



            ____________ _________ _________ __

            From: Shiva Kumar Mallikarjun <shivakumar_rnm@ yahoo.com>

            To: shivakumar_rnm@ yahoo.com

            Sent: Monday, 17 August, 2009 1:57:07 PM

            Subject: [bang-phpug] I have problem in displaying special characters 6 char's (œ, Œ , … , etc ) in textarea on webpage



            Hi,



            i have problem in displaying special characters(œ, Œ , … , etc ) in

            textarea in a page which are turned into ? mark instead of special

            char's.



            My html page is in utf-8 and also DB column collation is utf8 ... if i

            go directly to DB and enter these special char they shown good in DB

            but not in my textarea (shown some funny char's instead of œ, Œ , …)



            I used $str = str_replace( "œ","œ ",$description[ $i]); ...but its not at all detecting œ special char....it just turns into ? mark .



            what action i've to take before entering these special into DB and displaying in the textarea.



            Thanks,



            Shiva



            See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz. yahoo.com/



            [Non-text portions of this message have been removed]



            Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads. yahoo.com/ in/internetexplo rer/



            [Non-text portions of this message have been removed]





























            Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/

            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.