KSC5601 <-> 유니코드 의 translation하는 소스 코드를 알

jyyunp3의 이미지

KSC5601과 유니코드사이의 변환(translation)을 해주는

소스코드를 알고 싶습니다.

Embedded system을 개발하는데,

저희 플랫폼은 KSC5601을 사용하는데,

유니코드를 읽어와야할 필요가 생겼습니다.

saxboy의 이미지

man iconv

정태영의 이미지

gchar*      g_convert                       (const gchar *str,
                                             gssize len,
                                             const gchar *to_codeset,
                                             const gchar *from_codeset,
                                             gsize *bytes_read,
                                             gsize *bytes_written,
                                             GError **error);

from glib
=3=33

오랫동안 꿈을 그리는 사람은 그 꿈을 닮아간다...

http://mytears.org ~(~_~)~
나 한줄기 바람처럼..

cinsk의 이미지

Embedded System이라니 한 마디 더요.

그게 glibc, iconv, glib, 등을 지원한다면 보실 필요 없고,
그렇지 않다면 아마 좀 속을 썩히실 것 같습니다. 저도 그 문제로 좀 골치가 아팠거든요.

ksc5601을 UTF-8, 16, 32로 바꿔주기만 한다면야 단순한 mapping table만 써도 될 것 같군요.

"CJKV Information Processing"

책 또는 ftp://ftp.oreilly.com/pub/examples/nutshell/cjkv

밑에 찾아보시면 관련 자료가 나올 겁니다.

marten의 이미지

cinsk wrote:

ksc5601을 UTF-8, 16, 32로 바꿔주기만 한다면야 단순한 mapping table만 써도 될 것 같군요.

ksc5601을 UTF-8로 변환하기 위해서는 먼저 유니코드로 변환해야 합니다.
그러므로 유니코드로의 변환문제를 먼저 해결해야할 듯 합니다.

김충길의 이미지

딱히 저 변화 소스만 쓰고자 하신다면 iconv 소스를 참고하세요.

거기 보면 한글 인코딩 관련 소스가 몇개 있습니다.

screen + vim + ctags 좋아요~

saxboy의 이미지

음... 저는 iconv 소스를 뜯어보시라는 뜻이었는데... 사실 iconv 가 그렇게 덩치가 큰 것은 아니지만, 그래도 작은 시스템에 통째로 올리기에는 좀 부담되는 것은 사실이지요.

좀 소스를 찾아보실 생각이시라면 한텀 소스를 뜯어보세요. 한국어 인코딩과 관련된 대부분의 테이블( 소스는 사실 별 의미가 없지요 )을 모두 구하실 수 있습니다.
물론 이 소스를 이해하시려면 기본적인 charset, encoding의 개념이 선행되어야겠지요. 그런 의미에서 CJKV information processing 은 다시 없을 좋은 레퍼런스입니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.