Skip to content

datetime: sanitize Unicode Ratio separators into ASCII colons on Windows (fixes #20036)#21260

Open
Mr-Charvaka wants to merge 1 commit into
darktable-org:masterfrom
Mr-Charvaka:fix/issue-20036
Open

datetime: sanitize Unicode Ratio separators into ASCII colons on Windows (fixes #20036)#21260
Mr-Charvaka wants to merge 1 commit into
darktable-org:masterfrom
Mr-Charvaka:fix/issue-20036

Conversation

@Mr-Charvaka
Copy link
Copy Markdown

@Mr-Charvaka Mr-Charvaka commented Jun 6, 2026

Resolves #20036.

Purpose & Goal

Replace localized Unicode Ratio characters (, UTF-8 \xe2\x88\xb6) with standard ASCII colons (:) in date-time strings on Windows, preventing rendering bugs and backend date-time parsing crashes.

Implementation Details

  • Implemented UTF-8 character search and byte-shifting logic inside dt_datetime_gdatetime_to_local in src/common/datetime.c.

Testing & Verification Approach

  • Checked that time string byte shifting uses memmove safely to copy the remaining string (including the null terminator) when shifting from 3-byte ratio to 1-byte colon.

Regression Safety

Shifts are safe and bounds-checked to prevent buffer overruns or memory corruption.

Development Note

This pull request was prepared with AI-assisted pair-programming (using the Gemini-powered Antigravity agent), and has been manually reviewed and refined for correctness.

@wpferguson
Copy link
Copy Markdown
Member

If this PR was generated with AI assistance, please note that.

What kind of testing was done? Was it only tested to make sure the problem was fixed or was testing also done to make sure there were no regressions or issues created by the fix?

@Mr-Charvaka
Copy link
Copy Markdown
Author

@wpferguson I have updated the PR you can find the specific testing approach, regression safety checks, and implementation breakdown posted directly in the Pull Request description at the top of this page.

@wpferguson
Copy link
Copy Markdown
Member

Testing & Verification Approach
Checked that time string byte shifting uses memmove safely to copy the remaining string (including the null terminator) when shifting from 3-byte ratio to 1-byte colon.
Regression Safety
Shifts are safe and bounds-checked to prevent buffer overruns or memory corruption.

IIUC you are relying on AI and code inspection to "test" the fix and not physically running darktable to verify and check for unexpected interactions.

I'm not judging, just trying to figure out how much, and what level of, testing these PRs are going to require.

@Mr-Charvaka
Copy link
Copy Markdown
Author

Yea! i did but if you want i can test it physically and send you SS along with the PR to help you out with review process

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorect time separator in timestamp on Image Information in polish language

2 participants