Skip to content

Be aware some features will not work with variable length utf-8 #185

Open

Description

@clort81

Important Limitation
SDS does NOT provide UTF-8-aware character operations. For example:

sdslen() returns the byte length, not the character count
sdstrim() works on individual bytes, not UTF-8 grapheme clusters
sdstoupper() and sdstolower() use toupper()/tolower() on individual bytes (lines 783-794), which won't work correctly for UTF-8.

Activity

  1. nephatrine commented on Jun 25, 2026

    @nephatrine

    This matches the behaviour of the C standard library and seems like it would be expected for anyone using C. I wouldn't call not implementing such features a limitation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions