encode static method

List<int> encode(
  1. String src
)

Encodes a Unicode string to a list of Big5 encoded bytes.

Takes a Unicode string and converts it to its Big5 encoded byte representation. This is useful for storing or transmitting Chinese text in systems that expect Big5 encoding.

Parameters:

  • src: The Unicode string to encode

Returns:

  • A list of integers representing the Big5 encoded bytes

Example:

final encoded = Big5.encode("胖次");
print(encoded); // [173, 68, 166, 184]

Implementation

static List<int> encode(String src) {
  return _big5TransformEncode(src);
}