Skip to content

Commit

Permalink
The max Unicode char code applies now on all platforms.
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed Nov 8, 2024
1 parent e002531 commit f1d555c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/Tests/library/test_pio.pl
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,13 @@
max_char(text, 0xfffff). % Only if Locale is UTF-8! How to test?
max_char(iso_latin_1, 255).
max_char(utf8, Max) :-
( current_prolog_flag(windows, true)
-> Max = 0xffff % UCS-2
; Max = 0xfffff % Full Unicode range
).
current_prolog_flag(max_char_code, Max).
max_char(utf16be, Max) :-
( current_prolog_flag(windows, true)
-> Max = 0xffff % UCS-2
; Max = 0xfffff % Full Unicode range
).
current_prolog_flag(max_char_code, Max).
max_char(utf16le, Max) :-
max_char(utf16be, Max).
max_char(wchar_t, Max) :-
( current_prolog_flag(windows, true)
-> Max = 0xffff % UCS-2
; Max = 0xfffff
).

current_prolog_flag(max_char_code, Max).

save_list(File, Codes, Enc) :-
open(File, write, Out, [encoding(Enc)]),
Expand Down

0 comments on commit f1d555c

Please sign in to comment.