xuri / xgen

XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
BSD 3-Clause "New" or "Revised" License
313 stars 74 forks source link

fixed upper case first rune for Unicode #41

Closed yury-egorenkov closed 2 years ago

yury-egorenkov commented 2 years ago

Thank you for your library!

PR Details

I used this library to convert XSD on with Cyrillic (cp1251) characters.

Description

Unfortunately, it produces the wrong result in the image below.

image

I fixed MakeFirstUpperCase function to convert Unicode characters properly.

Now it's correct.

image

Raw XSD file for testing.

Types of changes

Checklist

xuri commented 2 years ago

LGTM, thank you.