this post was submitted on 02 Jul 2023
6 points (100.0% liked)

Programming

17025 readers
89 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Is there an elegant, cross-platform, way to determine the latest Unicode version that a machine supports?

top 6 comments
sorted by: hot top controversial new old
[โ€“] hunger@programming.dev 4 points 1 year ago (1 children)

What do you mean by "system support"? The system is mostly pushing bytes along, the programming languages/UI ovaries tend to do all the hard work. So it is usually more interesting to see what those support.

[โ€“] mron@lemmy.world 2 points 1 year ago* (last edited 1 year ago)

Emoji support is probably the best way to demonstrate what I mean:

A simple example: if this (๐Ÿฆโ€โฌ›) renders as an image of a blackbird, your system supports Unicode 15.0.

A more complex example: if this (๐Ÿง‘โ€โš–๏ธ) appears as a judge, your system supports Unicode 12.1, if it appears as a Person followed by Scales your system supports Unicode 10.0, and if you can only see the Scales, your system supports Unicode 4.1.

The downstream use case would be to avoid attempting to output specific characters for a user that wouldn't see them correctly (i.e. if I want to output a blackbird, I want them to see it, or if I output a judge I don't want them to see scales).

[โ€“] redacted_name@lemmy.ca 4 points 1 year ago (1 children)

Is this "support" in the sense of "can this sequence of code points be rendered correctly to the screen"?

OS and font dependent.

[โ€“] mron@lemmy.world 1 points 1 year ago* (last edited 1 year ago)
[โ€“] 0x0@programming.dev 2 points 1 year ago (1 children)

Which programming language do you have in mind?

[โ€“] mron@lemmy.world 1 points 1 year ago

I'm flexible tbh, but my initial checks with a Python approach led me to unicodedata.unidata_version, which is correct for Python support but not system support.

load more comments
view more: next โ€บ