Skip to content

Discrepancy: String.data(using: .japaneseEUC) returns nil on non-Darwin. #1016

Open
@YOCKOW

Description

@YOCKOW

Given the following code:

import Foundation
print("Hello, world!".data(using: .japaneseEUC) as Any)

Results are:

OS Swift Result
macOS 5.10 "Optional(13 bytes)"
Ubuntu 5.10 "nil"
macOS 6.0 "Optional(13 bytes)"
Ubuntu 6.0 "nil"

This is not regression but discrepancy which should be also fixed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions