You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that SYSTEM:AVAILABLE-ENCODINGS returns a list of symbols which represent the various encodings that are discovered via Charset.availableCharsets. That's great, but the symbols are apparently not interned in the keyword package, so it makes it somewhat confusing to determine whether a given encoding is on the list.
e.g. (member :utf-16 (system:available-encodings)) returns NIL, although looking at the list, you can see that :UTF-16 is there.
Confusingly, (mapcar #'symbol-package (system:available-encodings)) shows that all symbols are in the keyword package, but (find-symbol "UTF-16" :keyword) returns NIL.
I believe the problem is that availableEncodings in src/org/armedbear/lisp/Stream.java says, in part, (at line 399 in the current version)
newSymbol(charset, PACKAGE_KEYWORD)
but I think more appropriate would be
PACKAGE_KEYWORD.intern(charset)
Here is a patch which implements that change, and fixes the bug, from what I can tell.
I see that SYSTEM:AVAILABLE-ENCODINGS returns a list of symbols which represent the various encodings that are discovered via Charset.availableCharsets. That's great, but the symbols are apparently not interned in the keyword package, so it makes it somewhat confusing to determine whether a given encoding is on the list.
e.g.
(member :utf-16 (system:available-encodings))
returns NIL, although looking at the list, you can see that:UTF-16
is there.Confusingly,
(mapcar #'symbol-package (system:available-encodings))
shows that all symbols are in the keyword package, but(find-symbol "UTF-16" :keyword)
returns NIL.I believe the problem is that availableEncodings in src/org/armedbear/lisp/Stream.java says, in part, (at line 399 in the current version)
but I think more appropriate would be
Here is a patch which implements that change, and fixes the bug, from what I can tell.
The text was updated successfully, but these errors were encountered: