jimmiebergmann / mini-yaml

Single header YAML 1.0 C++11 serializer/deserializer.
MIT License
222 stars 42 forks source link

Problems with parsing values where Cyrillic characters are present #13

Open Sam4uk opened 3 years ago

Sam4uk commented 3 years ago

Problems with parsing values where Cyrillic characters are present

Got a problem when parsing a file where the values of the keys are strings with Cyrillic characters

https://github.com/jimmiebergmann/mini-yaml/blob/22d3dcf5684a11f9c0508c1ad8b3282a1d888319/yaml/Yaml.cpp#L1460

Politofr09 commented 3 months ago

I have the same exception thrown when trying to use extended ASCII such as "à" or á etc Simply comment the for loop and it's working.

                // Validate characters.
                // for (size_t i = 0; i < line.size(); i++)
                // {
                //     if (line[i] != '\t' && (line[i] < 32 || line[i] > 255))
                //     {
                //         throw ParsingException(ExceptionMessage(g_ErrorInvalidCharacter, lineNo, i + 1));
                //     }
                // }