Other characters than A-Z in console app

Discussion in 'iOS Development' started by R&S, Feb 14, 2010.

  1. R&S

    R&S Member

    Joined:
    Mar 14, 2009
    Messages:
    315
    Likes Received:
    0
    Device:
    4G iPod touch
    Hi, i have written a small program in c++ and have succeed in installing the GNU compiler on my iPod touch and compile my program.
    My problem is that the program is written in dansih, so the characters æ, ø and å is in some parts of the program. the iPod however doesn't show the correct characters, whenever there should have been an æ, ø or å, there is instead just a black square. does someone know how i can fix this.

    btw. the app runs as it should when compilled on windows.

    //R&S
  2. Axis

    Axis Super Moderator Staff Member

    Joined:
    Dec 2, 2007
    Messages:
    6,288
    Likes Received:
    133
    Device:
    iPhone 4S (White)
    I ran a simple test.

    [OBJC]
    #include <stdio.h>
    int main() {

    puts("å å å");

    return 0;
    }
    [/OBJC]

    I compiled and ran it in MobileTerminal. I didn't get a black square like you mentioned, but I didn't get the correct output either. I then redirected stdout (./myProgram > test.txt) and discovered that the å printed cleanly.

    Also, I ran the program through an SSH connection from my computer. The å printed cleanly on my Mac's Terminal.

    It must be something with MobileTerminal.
  3. Shawa

    Shawa Super Moderator

    Joined:
    Jan 31, 2009
    Messages:
    3,188
    Likes Received:
    22
    Device:
    Nexus 4
    It may be something as simple as the font that MobileTerminal uses. If you could find a way, replacing it with a monospace font with international characters would probably do the trick.
  4. R&S

    R&S Member

    Joined:
    Mar 14, 2009
    Messages:
    315
    Likes Received:
    0
    Device:
    4G iPod touch
    Got it working, the problem was that in Windows, i had to put /x86, /x91 and /x9B in the code instead of æ, ø and å. I thought i would have to do that on the iPod to. So i just compiled the same code on my iPod as i did on Windows. But apperently, on UNIX systems, i just have to write the normal æ, ø and å instead of /x86 and so to get it shown correctly. I don't know why i actually didn't thought of that before. :S

Share This Page