UITableView and Japanese index titles

78 views
Skip to first unread message

Lee Probert

unread,
Aug 6, 2012, 10:12:25 AM8/6/12
to brighton-iph...@googlegroups.com
Hi folks. I wonder if anyone can help me here?

I have a table view rendering japanese names alphabetically. The section headers and index titles are generated automatically via the fetch controller and it seems to work in principle. The problem seems to be the character set that is being used to render the index ribbon.


Any ideas?



http://leeprobert.cc
http://gplus.to/leeprobert
http://about.me/leeprobert

skype: lee.probert
google/MSN/FaceTime : leepr...@gmail.com
twitter : @leeprobert
tel: +44 1892 837654
mobile Agnitio : +44 7711 374226

Adam Martin

unread,
Aug 6, 2012, 10:15:12 AM8/6/12
to brighton-iph...@googlegroups.com
What's the problem?

(the evernote link isn't working, site seems to be down?)
> --
> You received this message because you are subscribed to the Google Groups
> "Brighton iPhone Creators" group.
> To post to this group, send email to
> brighton-iph...@googlegroups.com.
> To unsubscribe from this group, send email to
> brighton-iphone-cr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/brighton-iphone-creators?hl=en.

Lee Probert

unread,
Aug 6, 2012, 10:20:27 AM8/6/12
to brighton-iph...@googlegroups.com
Strange. Just worked for me.

I need the japanese characters that are being rendered in the section headers to render in the index ribbon down the side. It seems to be mapping the unicode incorrectly or something. I can't find anything on the web about this issue.

Thanks, Lee.
--
IMPORTANT : I have a new mobile number. Please use +44 7711 374226

Will Johnston

unread,
Aug 6, 2012, 10:21:46 AM8/6/12
to brighton-iph...@googlegroups.com
seen this? This discusses what I think is the same problem.
Cheers
Will

Lee Probert

unread,
Aug 6, 2012, 10:41:32 AM8/6/12
to brighton-iph...@googlegroups.com
Yea, this quote suggests a bug ...

I am not sure whether this is a bug in the method sectionIndexTitleForSectionName: of NSFetchedResultsController or my own fault somewhere else, however my workaround consists in overriding it and performing what the documentation says it does internally:
- (NSString *)sectionIndexTitleForSectionName:(NSString *)sectionName
{
    NSString    *outName;
    if ( [sectionName length] )
        outName = [[sectionName substringToIndex:1] uppercaseString];
    else
        outName = [super sectionIndexTitleForSectionName:sectionName];
    return outName;
}
This produces the expected output.


I will explore further.

:-)

Adam Martin

unread,
Aug 6, 2012, 10:52:28 AM8/6/12
to brighton-iph...@googlegroups.com
On 6 August 2012 15:41, Lee Probert <leepr...@gmail.com> wrote:

>> overriding it and
>> performing what the documentation says it does internally:
>> ...This produces the expected output.

LOL

Lee Probert

unread,
Aug 6, 2012, 11:13:28 AM8/6/12
to brighton-iph...@googlegroups.com
funny ... and ... it worked.

:-)

--
You received this message because you are subscribed to the Google Groups "Brighton iPhone Creators" group.
To post to this group, send email to brighton-iph...@googlegroups.com.
To unsubscribe from this group, send email to brighton-iphone-cr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/brighton-iphone-creators?hl=en.

Reply all
Reply to author
Forward
0 new messages