Skip to content

Commit 666e325

Browse files
wip: deleting UTF-16
1 parent 9c1d0c8 commit 666e325

File tree

9 files changed

+11
-328
lines changed

9 files changed

+11
-328
lines changed

base/c.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ end
9393
# symbols are guaranteed not to contain embedded NUL
9494
convert(::Type{Cstring}, s::Symbol) = Cstring(unsafe_convert(Ptr{Cchar}, s))
9595

96+
# conversion between UTF-8-like data and UTF-16-like data for Windows APIs
97+
function utf8_to_utf16!(src::Vector{UInt8}, dst::Vector{UInt16})
98+
99+
end
100+
101+
function utf16_to_utf8!(src::Vector{UInt16}, dst::Vector{UInt8})
102+
103+
end
104+
96105
# deferring (or un-deferring) ctrl-c handler for external C code that
97106
# is not interrupt safe (see also issue #2622). The sigatomic_begin/end
98107
# functions should always be called in matched pairs, ideally via:

base/deprecated.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,8 @@ export float32_isvalid, float64_isvalid
500500
# 11241
501501
@deprecate is_valid_char(ch::Char) isvalid(ch)
502502
@deprecate is_valid_utf8(str::String) isvalid(str)
503-
@deprecate is_valid_utf16(str::UTF16String) isvalid(str)
504503
@deprecate is_valid_char(ch) isvalid(Char, ch)
505504
@deprecate is_valid_utf8(str) isvalid(String, str)
506-
@deprecate is_valid_utf16(str) isvalid(UTF16String, str)
507505

508506
# 12087
509507
@deprecate call(P::Base.DFT.Plan, A) P * A

base/docs/helpdb/Base.jl

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3950,32 +3950,6 @@ Compute ``\\sin(\\pi x) / (\\pi x)`` if ``x \\neq 0``, and ``1`` if ``x = 0``.
39503950
"""
39513951
sinc
39523952

3953-
"""
3954-
utf16(s)
3955-
3956-
Create a UTF-16 string from a byte array, array of `UInt16`, or any other string type. (Data
3957-
must be valid UTF-16. Conversions of byte arrays check for a byte-order marker in the first
3958-
two bytes, and do not include it in the resulting string.)
3959-
3960-
Note that the resulting `UTF16String` data is terminated by the NUL codepoint (16-bit zero),
3961-
which is not treated as a character in the string (so that it is mostly invisible in Julia);
3962-
this allows the string to be passed directly to external functions requiring NUL-terminated
3963-
data. This NUL is appended automatically by the `utf16(s)` conversion function. If you have
3964-
a `UInt16` array `A` that is already NUL-terminated valid UTF-16 data, then you can instead
3965-
use `UTF16String(A)` to construct the string without making a copy of the data and treating
3966-
the NUL as a terminator rather than as part of the string.
3967-
"""
3968-
utf16(s)
3969-
3970-
"""
3971-
utf16(::Union{Ptr{UInt16},Ptr{Int16}} [, length])
3972-
3973-
Create a string from the address of a NUL-terminated UTF-16 string. A copy is made; the
3974-
pointer can be safely freed. If `length` is specified, the string does not have to be
3975-
NUL-terminated.
3976-
"""
3977-
utf16(::Union{Ptr{UInt16},Ptr{Int16}}, length=?)
3978-
39793953
"""
39803954
median(v[, region])
39813955

base/exports.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export
117117
Tridiagonal,
118118
UnitRange,
119119
UpperTriangular,
120-
UTF16String,
121120
Val,
122121
VecOrMat,
123122
Vector,
@@ -891,7 +890,6 @@ export
891890
unescape_string,
892891
uppercase,
893892
utf8,
894-
utf16,
895893
warn,
896894
xdump,
897895

base/serialize.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const TAGS = Any[
2121
LineNumberNode, SymbolNode, LabelNode, GotoNode,
2222
QuoteNode, TopNode, TypeVar, Box, LambdaStaticData,
2323
Module, #=UndefRefTag=#Symbol, Task, String,
24-
UTF16String, Float16,
24+
Float16,
2525
SimpleVector, #=BackrefTag=#Symbol, :reserved11, :reserved12,
2626

2727
(), Bool, Any, :Any, Bottom, :reserved21, :reserved22, Type,

base/unicode.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# This file is a part of Julia. License is MIT: http://julialang.org/license
22

33
include("unicode/UnicodeError.jl")
4-
include("unicode/types.jl")
54
include("unicode/checkstring.jl")
65
include("unicode/utf8.jl")
7-
include("unicode/utf16.jl")
86
include("unicode/utf32.jl")
97
include("unicode/utf8proc.jl")
108
importall .UTF8proc

base/unicode/types.jl

Lines changed: 0 additions & 18 deletions
This file was deleted.

base/unicode/utf16.jl

Lines changed: 0 additions & 272 deletions
This file was deleted.

0 commit comments

Comments
 (0)