korean

package module
v0.0.0-...-0d82775 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2019 License: BSD-2-Clause Imports: 3 Imported by: 0

README

Korean

Build Status CodeBot Status Coverage Status

Package korean provides Korean encodings such as EUC-KR and CP949. It is a wrapper of code.google.com/p/go.text/encoding/korean package for easy to use.

Installation

$ go get github.com/atomaths/korean

Usage

import "github.com/atomaths/korean"
src := "\xb9\xe6\xb0\xa1\xb9\xe6\xb0\xa1\x20\xb0\xed\xc6\xdb"
dst, _ := korean.UTF8([]byte(src))
fmt.Println(string(dst)) // Output: 방가방가 고퍼
src := "방가방가 고퍼"
dst, _ = korean.EUCKR([]byte(src))
for _, v := range dst {
        fmt.Printf("\\x%x", v)
        // Output: \xb9\xe6\xb0\xa1\xb9\xe6\xb0\xa1\x20\xb0\xed\xc6\xdb
}

Documentation

GoDoc

Documentation

Overview

Example
dst, _ := UTF8([]byte("\xb9\xe6\xb0\xa1\xb9\xe6\xb0\xa1\x20\xb0\xed\xc6\xdb"))
fmt.Printf("%s\n", dst)
Output:

방가방가 고퍼

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func EUCKR

func EUCKR(src []byte) (dst []byte, err error)

EUCKR converts from UTF-8 bytes to EUC-KR bytes.

func UTF8

func UTF8(src []byte) (dst []byte, err error)

UTF8 converts from EUC-KR bytes to UTF-8 bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL