Skip to content

Commit

Permalink
Added peachpie_set_string_encoding()
Browse files Browse the repository at this point in the history
  • Loading branch information
kripper committed Sep 7, 2022
1 parent 980b68b commit c3216a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Peachpie.Library/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ internal static CharMap InitializeCharMap()

#endregion

// Helper function to change Console.OutputEncoding from PHP
public static void peachpie_set_string_encoding(string str) {
Console.OutputEncoding = Encoding.GetEncoding(str);
}

#region ord, chr, bin2hex, hex2bin

///// <summary>
Expand Down

0 comments on commit c3216a4

Please sign in to comment.