simple-keyboard icon indicating copy to clipboard operation
simple-keyboard copied to clipboard

Fix wrong capital sharp S (ß, U+00DF)

Open Sogolumbo opened this issue 2 years ago • 5 comments

The java function String.toUpperCase() converts the sharp S (ß, U+00DF) into 'SS' instead of ẞ (U+1E9E). That's wrong, I fixed it.

Fixes on of the issues mentioned in #254.

Sogolumbo avatar Apr 07 '22 14:04 Sogolumbo

I wasn't able to test this code because I have no working setup for Android App building.

Sogolumbo avatar Apr 07 '22 14:04 Sogolumbo

Setting up build environment is easy. All you need is Android Studio. This project has no dependencies and no native code so no extras are needed.

rkkr avatar Apr 12 '22 05:04 rkkr

Setting up build environment is easy. All you need is Android Studio. This project has no dependencies and no native code so no extras are needed.

Yep in theory it's easy. But when I open the folder in Android Studio I get an error:

Unable to find method 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

The recommended fixes don't work for me. I don't know anything about gradle and I don't have the time at hand to dive into it.

Sogolumbo avatar Apr 25 '22 03:04 Sogolumbo

image

\u1E9E is not available in older Android version. So an SDK version check is needed for version since when it's included (probably Android 6). Sending a message with ẞ to someone running older Android (and likely Windows) will result in them getting a ☐. The code also doesn't compile.

rkkr avatar May 01 '22 06:05 rkkr

I fixed the syntax.

What happens on older SDK versions? Is it still possible to type the letter? And is the letter encoded correctly (If I send the text to a person with higher SDK will they see the right character)?

Which kind of workaround would you deem appropriate? Would you like to show SS instead? Or show the non-capital character (ß, U+00DF)?

If a person would like to writeSS instead of (U+1E9E) they will most likely type S two times (because that's the quickest way). If they want to use (U+1E9E) but can't find it they will think that it's not available (which it isn't) and probably be fine.

Sogolumbo avatar May 01 '22 13:05 Sogolumbo