P3D3::Charset trouble

Issue #8 resolved
Marko Käning
created an issue

I've found that MacHg doesn't seem to be considering the charset of the text properly. Can that be?

Please check on the apostrophes in the descriptions of the same changeset at bitbucket and MacHg!

Well, it is possible that I perhaps messed up myself when I was committing the changeset from the command line. (I obviously used vi as the editor for commit messages.)

I have no clue why it looks right on bitbucket and wrong in MacHg. I cannot say who is right or wrong. Well, in my bash, actually, I do see the same output like on bitbucket.

Comments (13)

  1. Marko Käning reporter

    I just saw that even Apple's "TextEdit" editor has a problem displaying UTF-8 ascii files with a file open option set to automatic.

    So, I guess MacHg also struggles with UTF-8.

    I wonder which encoding is actually assumed by MacHg...

  2. Jason Harris repo owner
    • changed status to open

    Can I get access to this repository? Or could you make a simple test repository with a commit message like this and give me access to that?

    Thanks! Jason

  3. Marko Käning reporter

    I've seen now in another repo that umlauts are not properly displayed neither in the history table, nor in the Details view. Instead of an "ä" you'd see "a?"...

  4. Marko Käning reporter

    I just read in my new book that you need to read UTF-8 strings in like this:

    id aString = [NSString stringWithUTF8String:"Hello"]
    

    Perhaps you'd need something like this when you read localhg's output into memory in your wrapper routine?

    I didn't have the time to actually check myself how it is done, so this is just an idea.

  5. Jason Harris repo owner

    :) Check out line

        results.errStr = [[NSString alloc] initWithData:errData  encoding:NSUTF8StringEncoding];
    

    of the function - (ExecutionResult) extractResults in MacHg/Classes/General/TaskExecutions.m

    so I don't think thats exactly it. I'll spend some time really looking at this at some stage...

  6. Log in to comment