0

I have localizable English and French. I want display Registered symbols as a part of word i.e "MyApp®". English part of localization file shows this symbol correct in iOS APP UI. Same needs to display for French version i.e "MyAppᴹᴰ" but space comes in between 'M' and 'D'.

I also tried using unicode like MyApp\u{1D39}\u{1D30}. This gets worked in Swift playground but if I try it through Localization file it doesn't work.

iOS version: 11.4 I need to make changes in localization file only and not to use NSAttributed string every where in code. If anyone came across same problem, and found solution please post.

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file

print(String(describing: "MyApp\u{1D39}\u{1D30}" // swift playground
print(String(describing: "ᴹᴰ")) // swift playground

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file
"MyApp®" = "MyAppᴹᴰ" // Localization file- on UI space comes b/w ᴹ and ᴰ

print(String(describing: "MyApp\u{1D39}\u{1D30}")) // swift playground
print(String(describing: "ᴹᴰ")) // swift playground

"MyApp®" = "MyApp\u{1D39}\u{1D30}" // Localization file

On iOS app UI component should render MyApp® as MyAppᴹᴰ and no space between ᴹ and ᴰ.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
aMo
  • 1
  • 2
  • Go through this link , may be it will help you >> https://stackoverflow.com/questions/14960218/how-can-i-add-the-french-trademark-symbol-md – Diksha235 Jan 24 '19 at 04:18

1 Answers1

0

Instead of using the separate superscript and characters, why not use the actual (U+1F16B) character?

In your localization file, put:

"MyApp®" = "MyApp"
rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • I am using same without space. Also would like add one more thing, on iOS 12 it works fine but below iOS 12 it shows "?" instead of . – aMo Jan 24 '19 at 07:26
  • You need to update your question to make it clear that you already know about the ` ` but that it doesn't work under iOS 11. Your question makes no mention of ` `, only the two separate characters. Most likely it is a newer Unicode character only added since iOS 12. – rmaddy Jan 24 '19 at 14:06