File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1- // This file is part of YamlDotNet - A .NET library for YAML.
1+ // This file is part of YamlDotNet - A .NET library for YAML.
22// Copyright (c) Antoine Aubry and contributors
33//
44// Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -544,6 +544,20 @@ public void Utf16StringsAsUtf8SurrogatesWorkCorrectly()
544544 StreamEnd ) ;
545545 }
546546
547+ [ Fact ]
548+ public void Utf16CharactersAreReadCorrectly ( )
549+ {
550+ AssertSequenceOfTokensFrom ( Yaml . ScannerForText ( "Test: \" \uD83D \uDC4D \" " ) ,
551+ StreamStart ,
552+ BlockMappingStart ,
553+ Key ,
554+ PlainScalar ( "Test" ) ,
555+ Value ,
556+ DoubleQuotedScalar ( "\uD83D \uDC4D " ) , // guaranteed thumbs up emoticon that will work in Windows Terminal since it pukes on displaying it.
557+ BlockEnd ,
558+ StreamEnd ) ;
559+ }
560+
547561 private void AssertPartialSequenceOfTokensFrom ( Scanner scanner , params Token [ ] tokens )
548562 {
549563 var tokenNumber = 1 ;
You can’t perform that action at this time.
0 commit comments