1. Download our Official Android App: Forums for Android!

Apps How to convert ASCII characters to string in Android?

Discussion in 'Android Development' started by adamhala007, Jul 30, 2013.

  1. adamhala007

    adamhala007 Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    6
    Joined:
    Jul 18, 2013

    Jul 18, 2013
    6
    0
    5
    Male
    Slovakia
    Hi!


    I am loading a text to TextView from a file on a webpage with my Android app but the problem is that the text is full of ASCII characters, so when the text is loaded to the TextView, I can't see any of these ASCII characters or it shows me a "?" within a black square.


    My question is, how can I convert an ASCII character to string?


    Thanks for helping.
     

    Advertisement

  2. Calc

    Calc Member
    Rank:
    None
    Points:
    36
    Posts:
    65
    Joined:
    Aug 4, 2013

    try

    String string = String(asciiString.getBytes("UTF-8"),"UTF-8');
     

Share This Page

Loading...