Internationalization

RSS for tag

Make your app available to an international audience by adapting it to multiple languages, regions, and cultures.

Posts under Internationalization tag

144 Posts

Post

Replies

Boosts

Views

Activity

App managed by 2 organizations/ App management for different countries
Hello, I have an app which offers content and users can have access through a montly subscription în app. We plan to expand in a different Country in which we need a different Organization as owner of the app and the revenue genereted from users in the new released country should go to the new organization. If there a way to keep the same app in store but to have multiple entities to manage them for different countries??
0
0
676
Aug ’23
App is terminated when user changes language
Dear Experts, NSLocale has a notification NSCurrentLocaleDidChangeNotification and a property autoupdatingCurrentLocale ("A locale which tracks the user’s current preferences"). These suggest that an app should be able to detect when the user changes their language preference while running, or when it is resumed from the background. In practice, when I change language in the Settings app (either globally or just for my app), the app is terminated by iOS and restarts with new locale. Is this the expected behaviour? I am wondering if there is something I need to do to advertise that the app can adopt language changes without restarting, or something. Maybe only date-time formats, etc., trigger the notification but language changes don't?
2
0
1.6k
Jul ’23
DateFormatter localized abbreviated months
Using Swift's DateFormatter class, how does it convert abbreviated date format to languages that don't support abbreviated month names e.g. Urdu For Example, the following code doesn't return the correct Urdu translation for abbreviated Month format. let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, yyyy" dateFormatter.locale = Locale(identifier: "ur-IN") let date = Date() let formattedDate = dateFormatter.string(from: date) print(formattedDate) // Expected: "جولائی ۱۲, ۲۰۲۳" for Jul 12, 2023 // Actual: "جول ۱۲, ۲۰۲۳"
2
0
1.2k
Jul ’23
NumberFormatter not correctly identifying Locale currency settings in iOS 17 beta with Xcode 15.0 beta
I'm currently developing an application for iOS and I recently updated to the iOS 17 beta along with Xcode 15.0 beta. I am trying to use NumberFormatter to format a Double to a currency string (in my case, American Dollars $). Here is the snippet of my code: let formatter = NumberFormatter() formatter.currencySymbol = Locale.current.currencySymbol print(Locale.current.currency) print(Locale.current.currencySymbol) print(Locale.current.currency?.identifier) print(Locale.current) formatter.numberStyle = .currency When running this on iOS 16, I get the following output: Optional("$") Optional("USD") en_US (current) However, when running the same code on iOS 17 beta, the output is different: nil Optional("¤") nil en_001 (fixed) It appears that the Locale's currency and identifier properties are returning nil, and the Locale itself is being identified differently. Has anyone else encountered this issue with iOS 17 beta and Xcode 15.0 beta? Is this a bug in the beta versions, or have there been changes in the way Locale should be used for currency formatting?
2
1
1.6k
Jun ’23
TextFiled lost focus and no key input on Japanese input Romaji mode
I write macOS menu app with TextField by SwiftUI on Japanese Input mode. On some conditions, the TextFiled lost focus, no key input, no mouse click. User cannot do anything. Setup MacOS Ventura 13.3.1 (a) Install Japanese Romaji Input source by System Preferences -> Keyboard Set input mode as "Romaji" Build test source code On Xcode 14.3, create new macOS app project "FocusTest" with SwiftUI, Swift. Replace FocusTestApp.swift with attached code. Build on Xcode Steps Set input mode as "Romaji" Run FocusTestApp Click T square icon on top menu Small windows with globe appear Click Desktop background area Click T square icon on top menu Click PIN T with PIN textField View appear That textField lost focus, click inside of textField Key or click is not accepted. With US keyboard mode, key input become possible on Step 10. But Focused blue square is missing. Code of FocusTestApp.swift import SwiftUI @main struct focusTestApp: App { var body: some Scene { MenuBarExtra("Test", systemImage: "t.square") { MainView() }.menuBarExtraStyle(.window) } } struct MainView: View { @State private var showingPIN: Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Button("PIN") { print("clicked") showingPIN = true } } .padding() .sheet(isPresented: $showingPIN) { PinView() } } } struct PinView: View { @Environment(\.presentationMode) var presentationMode @State private var pin: String = "" @FocusState private var pinIsFocused: Bool var body: some View { VStack { Image(systemName: "t.square") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 64.0, height: 64.0) .foregroundColor(.accentColor) Text("Enter PIN code") HStack { TextField("", text: $pin) .font(Font.system(size: 28, design: .default)) .frame(width:4*28.0, height:28.0) .focusable() .focused($pinIsFocused) } .onAppear(){ pinIsFocused = true } } .padding() } }
0
2
1.6k
May ’23
New keyboard
As a classical Arabic, student, learning the Arabic lanaguage, using the English keyboard is a big part of our journey. I hope Apple, can add a keyboard that is English(Arabic), because using the English alphabet is a big part of us students, learning the foreign language for pronunciation and writting/reading skills. Thankyou for considering!
1
0
972
May ’23
Key equivalent matching for non-US English keyboard layouts
Based on these Swift docs and this forum thread, keyboard shortcuts / key equivalents are expected to be declared based on a US English layout. As an application developer, you may then rely on the auto localization provided by allowsAutomaticKeyEquivalentLocalization, (for menus) or localize your key equivalents manually (menus and other controls with key equivalents). But how does AppKit handle non localized key equivalents when faced with a non-US English keyboard layout? In particular, with a Hebrew layout active, the C key unmodified produces "ב", but when modified with ⌘ produces "c". Does AppKit compare the key equivalent ⌘c to the modified or un-modified char of the event, or both? Or is there more to this logic? E.g. does it also try to match the incoming event against a US-English layout, even if not active at the moment? The use-case here is implementing performKeyEquivalent for a custom control, where the documentation says: You should extract the characters for a key equivalent using the NSEvent method charactersIgnoringModifiers. So would simply comparing the event modifiers to the key equvialent modifers, and the event charactersIgnoringModifiers to the key equivalent give similar behavior to AppKit's own logic, e.g. in [NSEvent _matchesKeyEquivalent:modifierMask:]? Based on the observed behavior when pressing ⌘c with a Hebrew layout active, it does trigger an NSButton with a key equivalent of ⌘c, which doesn't seem to match the documented behavior of using the unmodified chars ("ב") as basis.
3
1
1.7k
May ’23
App crash on launch only in Ireland
The App review said that our App crashed on launch in Cork, Ireland. When they tested it in the U.S., it works well. We also don't have any problem testing it using TestFlight in Taiwan. We've tried to VPN to Ireland and open the app from TestFlight but it still works well. Does anyone have this regional problem or know how to reproduce it? Development environment The app is developed by React Native (version 0.70.5), using the Expo framework (Expo SDK 47)
5
0
1.1k
Apr ’23
Issue: [Inflection] Cannot use Morphun
Hi community: I get an error using inflection on strings when the language is Spanish. Issue: [Inflection] Cannot use Morphun, (Checking that the token is the correct type): (null) The code: let value = "5 dias" var string = AttributedString(localized: "El primer \(value) es gratis") var morphology = Morphology() morphology.number = .plural string.inflect = InflectionRule(morphology: morphology) let result = string.inflected() Any workaround to solve it?
0
0
1.1k
Mar ’23
Xcode UI testing right-to-left language but UI is left-to-right
In my UI test I'm trying to set different languages. I noticed that with right-to-left languages, such as Arabic, the UI is still aligned left-to-right. When I manually run the app with the scheme's language set to Arabic, the UI is correctly aligned right-to-left. Am I missing something? let app = XCUIApplication() app.launchArguments += ["-AppleLanguages", "(ar)"] app.launch()
1
0
1.2k
Mar ’23
DateFormatter is giving wrong date with Locale ar_AE (iOS 16 and above OS)
let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let localeIdentifier = "ar_AE" dateFormatter.locale = Locale(identifier: localeIdentifier) if let date = dateFormatter.date(from: "2022-12-26") {   dateFormatter.dateFormat = "dd MMM YYYY"   let displayDate = dateFormatter.string(from: date)   print(displayDate) // "26 ديسمبر 2023" } Converted date is one year ahead of the actual date. This issue occurs only with specific dates ranging from 26-Dec-2022 to 31st-Dec-2022, when Arabic locale is selected and on IOS 16.0 and above devices.
5
0
3.6k
Mar ’23
Strange behavior of TimeZone abbreviation in reverse Geocoding...
I am trying to get local times for an event, and I keep getting different time depending on the type of device I am running on, either simulator, or real device. The code: `do {       let placemarks = try await CLGeocoder().reverseGeocodeLocation(location)       if (placemarks.count) > 0 {         let localPlacemark = placemarks.first!         let timeZone = localPlacemark.timeZone!         let tzString = timeZone.abbreviation()         print("Time Zone for \(String(describing: localPlacemark.locality)) is \(tzString )")         return localPlacemark.locality ?? "Unknown Locale"       }       else {         print("Problem with the data received from geocoder")       }     }  On an iPhone 14, the timeZone.abbreviation I get (for the same location) is "EST". But on an iPhone 13, I get "GMT-5", same on an iPhone 8. All three are running iOS 16.2. Has anyone ever seen this? Also, since I am working with a full date during daylight savings time, on the 14 the time returned is correct (DST time), but "isDaylightSavingsTime" always returns false. This makes sense since the abbreviation is "EST" and not "EDT". However, the time returned is correct. On the iPhones 13 mini and 8, the time returned is Standard and not Daylight Savings. This is truly baffling. Any insights, suggestions or help are welcome! Thank you!!
2
0
1k
Feb ’23
iOS Mail app generates invalid headers
iOS Mail app generates e-mail headers such as this: Cc: "Pop =?UTF-8?B?Wm9sdMOhbiI=?= <user@tld.com> RFC822 specifies how strings can be quoted with <"> = <ASCII quote mark> quoted-string = <"> *(qtext/quoted-pair) <"> RFC1342 specifies how non-ASCII text can be encoded encoded-word = "=" "?" charset "?" encoding "?" encoded-text "?" "=" encoded-text = 1*<Any printable ASCII character other than "?" or ; SPACE> (but see "Use of encoded-words in message ; headers", below) Although not explicitely prohibited by RFC1342, encoding the enclosing quote while not encoding the starting quote causes server-side SMTP processing to fail, if decoding is not performed before quote processing. IMO, quotes should NOT be encoded as per the intent of RFC822 to use the ASCII quote mark as delimiter.
2
1
1.7k
Feb ’23
Cmd+; keystroke with French AZERTY also produces an Esc KeyPress
Hello! I have a big complex application that struggles from a problem when a user presses Cmd+; shortcut on French AZERTY kb layout (the same physical keys as for Cmd+, on the default ABC layout), AppKit generates the following events: FlagsChanged for pressed Cmd modifier KeyDown with keycode=43 (comma), chars=";" KeyDown with keycode=53 (Esc) KeyUp with keycode=43 (comma), chars=";" FlagsChanged for released Cmd modifier I discovered that the Esc event comes from the internal method -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] which has a snippet of logic like the following: /* ... */ if ([event _matchesKeyEquivalent: [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] modifierMask:NSCommandKeyMask]) { /* explicitly send an Esc event instead */ } /* ... */ That looks unexpected, so my first question is why does such a logic exist there? Anyway, if there is such a logic in AppKit then I should observe the same behaviour in other AppKit apps, right? But a very simple application (which is essentially just an NSView which logs all keyboard events) doesn't receive an additional Esc event for the same keystroke on the same layout. The difference is that the internal AppKit call [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] returns @";" in case of my complex app but @"." in case of the simple one. And now I'm stuck trying to understand that difference, i.e. what could affect the behaviour of the [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] call since it's an internal AppKit call and there is no documentation for it and I don't know it's real semantic. Could anybody please advise smth? Thus, I would like to raise the following questions: What is real purpose of the AppKit logic expressed by the code snippet above? What can affect the behaviour of the [NSKeyboardShortcut localizedKeyEquivalentForInput:] call? What is its semantic? macOS SDK 12.3, if it matters.
1
0
1.2k
Feb ’23
App managed by 2 organizations/ App management for different countries
Hello, I have an app which offers content and users can have access through a montly subscription în app. We plan to expand in a different Country in which we need a different Organization as owner of the app and the revenue genereted from users in the new released country should go to the new organization. If there a way to keep the same app in store but to have multiple entities to manage them for different countries??
Replies
0
Boosts
0
Views
676
Activity
Aug ’23
App is terminated when user changes language
Dear Experts, NSLocale has a notification NSCurrentLocaleDidChangeNotification and a property autoupdatingCurrentLocale ("A locale which tracks the user’s current preferences"). These suggest that an app should be able to detect when the user changes their language preference while running, or when it is resumed from the background. In practice, when I change language in the Settings app (either globally or just for my app), the app is terminated by iOS and restarts with new locale. Is this the expected behaviour? I am wondering if there is something I need to do to advertise that the app can adopt language changes without restarting, or something. Maybe only date-time formats, etc., trigger the notification but language changes don't?
Replies
2
Boosts
0
Views
1.6k
Activity
Jul ’23
Date formats in App Store Connect
Is it possible to change the date formats used in the App Store Connect web interface? It seems to me that things like the date range selection widget on the Sales & Trends page use only the US-style MM/DD/YYYY format. Is there some way to change this to YYYY-MM-DD or DD/MM/YYYY that I have missed?
Replies
2
Boosts
0
Views
1k
Activity
Jul ’23
DateFormatter localized abbreviated months
Using Swift's DateFormatter class, how does it convert abbreviated date format to languages that don't support abbreviated month names e.g. Urdu For Example, the following code doesn't return the correct Urdu translation for abbreviated Month format. let dateFormatter = DateFormatter() dateFormatter.dateFormat = "MMM d, yyyy" dateFormatter.locale = Locale(identifier: "ur-IN") let date = Date() let formattedDate = dateFormatter.string(from: date) print(formattedDate) // Expected: "جولائی ۱۲, ۲۰۲۳" for Jul 12, 2023 // Actual: "جول ۱۲, ۲۰۲۳"
Replies
2
Boosts
0
Views
1.2k
Activity
Jul ’23
NumberFormatter not correctly identifying Locale currency settings in iOS 17 beta with Xcode 15.0 beta
I'm currently developing an application for iOS and I recently updated to the iOS 17 beta along with Xcode 15.0 beta. I am trying to use NumberFormatter to format a Double to a currency string (in my case, American Dollars $). Here is the snippet of my code: let formatter = NumberFormatter() formatter.currencySymbol = Locale.current.currencySymbol print(Locale.current.currency) print(Locale.current.currencySymbol) print(Locale.current.currency?.identifier) print(Locale.current) formatter.numberStyle = .currency When running this on iOS 16, I get the following output: Optional("$") Optional("USD") en_US (current) However, when running the same code on iOS 17 beta, the output is different: nil Optional("¤") nil en_001 (fixed) It appears that the Locale's currency and identifier properties are returning nil, and the Locale itself is being identified differently. Has anyone else encountered this issue with iOS 17 beta and Xcode 15.0 beta? Is this a bug in the beta versions, or have there been changes in the way Locale should be used for currency formatting?
Replies
2
Boosts
1
Views
1.6k
Activity
Jun ’23
UIDatePicker return wrong date in iOS16.5 and iOS16.6
I am using UIDatepicker,and I set a Chinese Calendar for it.It worked well in iOS16.2. But now, the datePicker return -0614-MM-dd HH:mm:ss +0000 while it return 2023-MM-dd HH:mm:ss +0000 in iOS16.2,I do not know what is -0614?
Replies
1
Boosts
1
Views
938
Activity
Jun ’23
Adverbs of frequency, Dates
Hi community: Thanks for readme. I want to achieve get an adverb of frequency from a time interval or date component. So if I have something that measure one week, I want to get "weekly" as result, the same for 2 weeks "bi-weekly", month "monthly" and so on. Is there any foundation API to get it? Thanks in advance
Replies
3
Boosts
0
Views
1.1k
Activity
May ’23
My Apps doesn't work until I turn on the VPN and change my region
Hi.. My applications do not open until I turn on the VPN and change my region. Can I find out the reason and solve this problem? For your information, my applications are booking taxis in the Yemeni capital, Sanaa. Thanks
Replies
1
Boosts
0
Views
779
Activity
May ’23
TextFiled lost focus and no key input on Japanese input Romaji mode
I write macOS menu app with TextField by SwiftUI on Japanese Input mode. On some conditions, the TextFiled lost focus, no key input, no mouse click. User cannot do anything. Setup MacOS Ventura 13.3.1 (a) Install Japanese Romaji Input source by System Preferences -&gt; Keyboard Set input mode as "Romaji" Build test source code On Xcode 14.3, create new macOS app project "FocusTest" with SwiftUI, Swift. Replace FocusTestApp.swift with attached code. Build on Xcode Steps Set input mode as "Romaji" Run FocusTestApp Click T square icon on top menu Small windows with globe appear Click Desktop background area Click T square icon on top menu Click PIN T with PIN textField View appear That textField lost focus, click inside of textField Key or click is not accepted. With US keyboard mode, key input become possible on Step 10. But Focused blue square is missing. Code of FocusTestApp.swift import SwiftUI @main struct focusTestApp: App { var body: some Scene { MenuBarExtra("Test", systemImage: "t.square") { MainView() }.menuBarExtraStyle(.window) } } struct MainView: View { @State private var showingPIN: Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Button("PIN") { print("clicked") showingPIN = true } } .padding() .sheet(isPresented: $showingPIN) { PinView() } } } struct PinView: View { @Environment(\.presentationMode) var presentationMode @State private var pin: String = "" @FocusState private var pinIsFocused: Bool var body: some View { VStack { Image(systemName: "t.square") .resizable() .aspectRatio(contentMode: .fit) .frame(width: 64.0, height: 64.0) .foregroundColor(.accentColor) Text("Enter PIN code") HStack { TextField("", text: $pin) .font(Font.system(size: 28, design: .default)) .frame(width:4*28.0, height:28.0) .focusable() .focused($pinIsFocused) } .onAppear(){ pinIsFocused = true } } .padding() } }
Replies
0
Boosts
2
Views
1.6k
Activity
May ’23
New keyboard
As a classical Arabic, student, learning the Arabic lanaguage, using the English keyboard is a big part of our journey. I hope Apple, can add a keyboard that is English(Arabic), because using the English alphabet is a big part of us students, learning the foreign language for pronunciation and writting/reading skills. Thankyou for considering!
Replies
1
Boosts
0
Views
972
Activity
May ’23
Key equivalent matching for non-US English keyboard layouts
Based on these Swift docs and this forum thread, keyboard shortcuts / key equivalents are expected to be declared based on a US English layout. As an application developer, you may then rely on the auto localization provided by allowsAutomaticKeyEquivalentLocalization, (for menus) or localize your key equivalents manually (menus and other controls with key equivalents). But how does AppKit handle non localized key equivalents when faced with a non-US English keyboard layout? In particular, with a Hebrew layout active, the C key unmodified produces "ב", but when modified with ⌘ produces "c". Does AppKit compare the key equivalent ⌘c to the modified or un-modified char of the event, or both? Or is there more to this logic? E.g. does it also try to match the incoming event against a US-English layout, even if not active at the moment? The use-case here is implementing performKeyEquivalent for a custom control, where the documentation says: You should extract the characters for a key equivalent using the NSEvent method charactersIgnoringModifiers. So would simply comparing the event modifiers to the key equvialent modifers, and the event charactersIgnoringModifiers to the key equivalent give similar behavior to AppKit's own logic, e.g. in [NSEvent _matchesKeyEquivalent:modifierMask:]? Based on the observed behavior when pressing ⌘c with a Hebrew layout active, it does trigger an NSButton with a key equivalent of ⌘c, which doesn't seem to match the documented behavior of using the unmodified chars ("ב") as basis.
Replies
3
Boosts
1
Views
1.7k
Activity
May ’23
Country/Region Availability
I'm curious if there is a way I can make my iOS App available to download in Ethiopia, Africa which is where my users are located. I've checked Pricing &amp; Availability setting on the App Store Connect and have selected all 175 countries/regions but Ethiopia is not on that list. Does this mean it simply will not be available there?
Replies
2
Boosts
1
Views
1.7k
Activity
Apr ’23
App crash on launch only in Ireland
The App review said that our App crashed on launch in Cork, Ireland. When they tested it in the U.S., it works well. We also don't have any problem testing it using TestFlight in Taiwan. We've tried to VPN to Ireland and open the app from TestFlight but it still works well. Does anyone have this regional problem or know how to reproduce it? Development environment The app is developed by React Native (version 0.70.5), using the Expo framework (Expo SDK 47)
Replies
5
Boosts
0
Views
1.1k
Activity
Apr ’23
How to exclude/remove/disable an extension by region/country?
Hi, My application contains some extensions and one of them is the Call Directory extension. Because of uncompleted works, I don't want that extension to be available in a specified country, e.g. Vietnam. Can I exclude/remove/disable that extension if users download my application from App Store Vietnam? Thanks!
Replies
2
Boosts
0
Views
895
Activity
Apr ’23
Issue: [Inflection] Cannot use Morphun
Hi community: I get an error using inflection on strings when the language is Spanish. Issue: [Inflection] Cannot use Morphun, (Checking that the token is the correct type): (null) The code: let value = "5 dias" var string = AttributedString(localized: "El primer \(value) es gratis") var morphology = Morphology() morphology.number = .plural string.inflect = InflectionRule(morphology: morphology) let result = string.inflected() Any workaround to solve it?
Replies
0
Boosts
0
Views
1.1k
Activity
Mar ’23
Xcode UI testing right-to-left language but UI is left-to-right
In my UI test I'm trying to set different languages. I noticed that with right-to-left languages, such as Arabic, the UI is still aligned left-to-right. When I manually run the app with the scheme's language set to Arabic, the UI is correctly aligned right-to-left. Am I missing something? let app = XCUIApplication() app.launchArguments += ["-AppleLanguages", "(ar)"] app.launch()
Replies
1
Boosts
0
Views
1.2k
Activity
Mar ’23
DateFormatter is giving wrong date with Locale ar_AE (iOS 16 and above OS)
let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" let localeIdentifier = "ar_AE" dateFormatter.locale = Locale(identifier: localeIdentifier) if let date = dateFormatter.date(from: "2022-12-26") {   dateFormatter.dateFormat = "dd MMM YYYY"   let displayDate = dateFormatter.string(from: date)   print(displayDate) // "26 ديسمبر 2023" } Converted date is one year ahead of the actual date. This issue occurs only with specific dates ranging from 26-Dec-2022 to 31st-Dec-2022, when Arabic locale is selected and on IOS 16.0 and above devices.
Replies
5
Boosts
0
Views
3.6k
Activity
Mar ’23
Strange behavior of TimeZone abbreviation in reverse Geocoding...
I am trying to get local times for an event, and I keep getting different time depending on the type of device I am running on, either simulator, or real device. The code: `do {       let placemarks = try await CLGeocoder().reverseGeocodeLocation(location)       if (placemarks.count) &gt; 0 {         let localPlacemark = placemarks.first!         let timeZone = localPlacemark.timeZone!         let tzString = timeZone.abbreviation()         print("Time Zone for \(String(describing: localPlacemark.locality)) is \(tzString )")         return localPlacemark.locality ?? "Unknown Locale"       }       else {         print("Problem with the data received from geocoder")       }     }  On an iPhone 14, the timeZone.abbreviation I get (for the same location) is "EST". But on an iPhone 13, I get "GMT-5", same on an iPhone 8. All three are running iOS 16.2. Has anyone ever seen this? Also, since I am working with a full date during daylight savings time, on the 14 the time returned is correct (DST time), but "isDaylightSavingsTime" always returns false. This makes sense since the abbreviation is "EST" and not "EDT". However, the time returned is correct. On the iPhones 13 mini and 8, the time returned is Standard and not Daylight Savings. This is truly baffling. Any insights, suggestions or help are welcome! Thank you!!
Replies
2
Boosts
0
Views
1k
Activity
Feb ’23
iOS Mail app generates invalid headers
iOS Mail app generates e-mail headers such as this: Cc: "Pop =?UTF-8?B?Wm9sdMOhbiI=?= <user@tld.com> RFC822 specifies how strings can be quoted with <"> = <ASCII quote mark> quoted-string = <"> *(qtext/quoted-pair) <"> RFC1342 specifies how non-ASCII text can be encoded encoded-word = "=" "?" charset "?" encoding "?" encoded-text "?" "=" encoded-text = 1*<Any printable ASCII character other than "?" or ; SPACE> (but see "Use of encoded-words in message ; headers", below) Although not explicitely prohibited by RFC1342, encoding the enclosing quote while not encoding the starting quote causes server-side SMTP processing to fail, if decoding is not performed before quote processing. IMO, quotes should NOT be encoded as per the intent of RFC822 to use the ASCII quote mark as delimiter.
Replies
2
Boosts
1
Views
1.7k
Activity
Feb ’23
Cmd+; keystroke with French AZERTY also produces an Esc KeyPress
Hello! I have a big complex application that struggles from a problem when a user presses Cmd+; shortcut on French AZERTY kb layout (the same physical keys as for Cmd+, on the default ABC layout), AppKit generates the following events: FlagsChanged for pressed Cmd modifier KeyDown with keycode=43 (comma), chars=";" KeyDown with keycode=53 (Esc) KeyUp with keycode=43 (comma), chars=";" FlagsChanged for released Cmd modifier I discovered that the Esc event comes from the internal method -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] which has a snippet of logic like the following: /* ... */ if ([event _matchesKeyEquivalent: [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] modifierMask:NSCommandKeyMask]) { /* explicitly send an Esc event instead */ } /* ... */ That looks unexpected, so my first question is why does such a logic exist there? Anyway, if there is such a logic in AppKit then I should observe the same behaviour in other AppKit apps, right? But a very simple application (which is essentially just an NSView which logs all keyboard events) doesn't receive an additional Esc event for the same keystroke on the same layout. The difference is that the internal AppKit call [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] returns @";" in case of my complex app but @"." in case of the simple one. And now I'm stuck trying to understand that difference, i.e. what could affect the behaviour of the [NSKeyboardShortcut localizedKeyEquivalentForInput:@"."] call since it's an internal AppKit call and there is no documentation for it and I don't know it's real semantic. Could anybody please advise smth? Thus, I would like to raise the following questions: What is real purpose of the AppKit logic expressed by the code snippet above? What can affect the behaviour of the [NSKeyboardShortcut localizedKeyEquivalentForInput:] call? What is its semantic? macOS SDK 12.3, if it matters.
Replies
1
Boosts
0
Views
1.2k
Activity
Feb ’23