nsstring - iOS decode umlaut &$ -


i have example of need decoded:

@"f&#252r"

how can decoded nsstring looks like

fūr

i tried number of things including

[@"f&#252r" stringbydecodinghtmlentities] > f&#252r   [@"f&#252r" gtm_stringbyunescapingfromhtml] > f&#252r   

but no luck.

thanks!

update based on vikingosegundo's solution

    nslog(@"möchte decoded :     > %@", [@"möchte" stringbyencodinghtmlentities] );     nslog(@"möchte decoded to: > %@", [@"möchte" stringbydecodinghtmlentities] );      nslog(@"für decoded :     > %@", [@"für" stringbyencodinghtmlentities] );     nslog(@"für decoded to: > %@", [@"für" stringbydecodinghtmlentities] );      nslog(@"m&#246chte decoded:%@", [@"m&#246chte" stringbydecodinghtmlentitiescomma] );     nslog(@"f&#252r decoded:%@", [@"f&#252r" stringbydecodinghtmlentitiescomma] );  möchte decoded :     > möchte möchte decoded to: > möchte für decoded :     > für für decoded to: > für m&#246chte decoded:möchte f&#252r decoded:für 

note : stringbyencodinghtmlentities https://github.com/mwaterfall/mwfeedparser/tree/master/classes stringbydecodinghtmlentitiescomma vikingosegundo's category.

try

[@"für" stringbydecodinghtmlentities]; 

or

[@"für" gtm_stringbyunescapingfromhtml]; 

(note ;)

this category works out missing ;.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -