이곳은 다양한 오픈소스 프로젝트를 소개하고 리뷰, 활용 방법을 공유합니다.
조회 수 5243 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부

Flutter Application(Windows 플랫폼)에서 시리얼 장치의 정보 및 통신을 위해 libserialport 패키지를 사용할 때 한글 문자열이 정상적으로 출력되지 않았다.

flutter_libserialport-1.png

 

그럴 때는 dart-cp949 패키지를 사용한다.

import 'package:flutter/material.dart';
import 'package:cp949/cp949.dart' as cp949;
import 'package:flutter_libserialport/flutter_libserialport.dart';

...

final port = SerialPort(address);
cp949.decodeString(port.description);

or

cp949.decode(port.description.codeUnits);

...

 

CP949 (EUC-KR) 데이터를 유니코드 기반으로 잘못 해석하여 깨져 보이는 String 을 올바른 문자열로 decode 해준다.

flutter_libserialport-2.png

 

 

굿.

TAG •

  1. Elastic Stack 에 대해서

    Date2024.08.25 Bymakersweb Views1812
    Read More
  2. Flutter 위젯의 상태관리에 대해서

    Date2023.04.06 Bymakersweb Views2053
    Read More
  3. [NodeGui] JavaScript로 데스크탑 응용프로그램 작성

    Date2023.02.21 Bymakersweb Views4522
    Read More
  4. openFrameworks 한글 폰트 설정 및 출력하기

    Date2023.02.19 Bymakersweb Views1847
    Read More
  5. LVGL 을 통해 GUI 구현 시 한글 폰트 추가

    Date2023.02.07 Bymakersweb Views4323
    Read More
  6. Windows에서 Qt Creator + CMake + vcpkg 로 C++ 개발환경 구성 (POCO 라이브러리 DirectoryWatcher 예제)

    Date2023.01.14 Bymakersweb Views2519
    Read More
  7. NAppGUI, C언어용 크로스 플랫폼 GUI 라이브러리

    Date2022.10.10 Bymakersweb Views3265
    Read More
  8. No Image

    OTA 오픈소스 프로젝트

    Date2022.08.03 Bymakersweb Views2311
    Read More
  9. AGL (Automotive Grade Linux) 개요

    Date2022.06.19 Bymakersweb Views4491
    Read More
  10. Chromium과 Ozone 층

    Date2022.03.03 Bymakersweb Views2564
    Read More
  11. Flutter Application 에서 한글(EUC-KR) 깨져서 나오는 문제

    Date2022.01.06 Bymakersweb Views5243
    Read More
  12. CopperSpice 에 대해서 (C++ Gui 라이브러리)

    Date2022.01.02 Bymakersweb Views2617
    Read More
  13. Flutter/Dart 와 Qt/QML 비교

    Date2021.11.07 Bymakersweb Views3299
    Read More
  14. VSCode 와 Qbs 플러그인으로 C/C++ 개발환경 구성

    Date2021.09.12 Bymakersweb Views2728
    Read More
  15. ZeroMQ 를 이용한 Qt 응용프로그램 간 통신

    Date2021.08.28 Bymakersweb Views2548
    Read More
  16. C++를 위한 Lottie 라이브러리 with SDL2

    Date2021.08.15 Bymakersweb Views3026
    Read More
  17. CANdevStudio 를 사용하여 CAN 네트워크 시뮬레이션

    Date2021.03.09 Bymakersweb Views3796
    Read More
  18. Protocol Buffers 를 이용한 직렬화 with Conan Package Manager

    Date2021.02.24 Bymakersweb Views1955
    Read More
  19. 라즈베리파이에서 Redis의 Pub/Sub 패턴을 사용하는 Electron 응용프로그램

    Date2021.01.31 Bymakersweb Views2699
    Read More
  20. Nana, C++용 크로스플랫폼 GUI 라이브러리

    Date2021.01.06 Bymakersweb Views4142
    Read More
Board Pagination Prev 1 2 Next
/ 2