---
title: "#지피텔 #퍼플렉시티: 한글 주소 인코딩 문제"
url: "https://notes.junghanacs.com/notes/20250319T065051"
author: "Junghan Kim"
date: "2025-03-19T06:50:00+09:00"
lastmod: "2025-03-19T06:50:00+09:00"
tags: ["ai","bib","citation","gptel","hangul"]
description: "gptel과 Perplexity 인용 처리에서 한글 URL 인코딩 문제를 해결한 노트이다."
---

> [!abstract] 이 노트에 대하여
> 
> Perplexity 인용 URL이 한글 주소에서 깨지는 문제를 utf-8 디코딩 코드로 해결하는 과정을 담는다. 지피텔과 퍼블리싱, 한글 인코딩이 만나는 중요한 실무 노트다.

## BIBLIOGRAPHY

- “Perplexity: Citations · Issue #299 · Karthink/Gptel.” n.d. Accessed December 31, 2024. <https://github.com/karthink/gptel/issues/299>.
- Xeppetto. 2022. “웹브라우저 주소 복사 시 한글 깨질 때 Utf8 Url Encoding Cp949.” April 17, 2022. <https://xeppetto.github.io/%EC%86%8C%ED%94%84%ED%8A%B8%EC%9B%A8%EC%96%B4/Tools/20220417-%EC%9B%B9%EB%B8%8C%EB%9D%BC%EC%9A%B0%EC%A0%80-%EC%A3%BC%EC%86%8C-%EB%B3%B5%EC%82%AC-%EC%8B%9C-%ED%95%9C%EA%B8%80-%EA%B9%A8%EC%A7%88%EB%95%8C/index.html>.

## 히스토리

-   [2025-03-19 Wed 06:50] [@ #이맥스: #지피텔 #활용법](https://notes.junghanacs.com/notes/20240830T161957) 이걸 수정해서 쓰고 있는데 어찌 노트가 없는가? [#쿼츠](https://notes.junghanacs.com/meta/20241007T112300)도 같은 문제 있더라. [#퍼플렉시티AI](https://notes.junghanacs.com/bib/20241002T083930)

## 문제 정의

### 웹브라우저 주소 복사 시 한글 깨질 때 utf8 url encoding cp949

([Xeppetto 2022](https://notes.junghanacs.com/notes/20250319T065051#citeproc_bib_item_2))

-   Xeppetto
-   한국 사람이면 누구나 한 번쯤 경험해보았을 텐데, 블로그 포스팅을 한글 제목으로 하고, 주소를 복사해서 친구에게 보내주려고 하면 한글이 온통 이상한 방식으로 나온다. 예를 들어, 본 블로그 주소인 “xeppetto.github.io/소프트웨어/Tools/20220417-웹브라우저-주소-복사-시-한글-깨질때”를 웹브라우저 주소창에서
-   2022

## 한글 인코딩 - 처리 지피텔

-   [#지피텔](https://notes.junghanacs.com/meta/20250404T125106)

-   <https://github.com/junghan0611/gptel/blob/ko/gptel-openai-extras.el#L181>



```emacs-lisp
;; defsubst
(defun gptel--perplexity-parse-citations (citations)
  (let ((counter 0))
    (concat "\n\n- Citations:\n"
            (mapconcat (lambda (url)
                         (setq counter (1+ counter))
                         (format "  [%d] %s" counter (decode-coding-string (url-unhex-string url t) 'utf-8)))
                       citations "\n"))))
```

## Perplexity: citations · Issue #299 · karthink/gptel

([“Perplexity: Citations · Issue #299 · Karthink/Gptel” n.d.](https://notes.junghanacs.com/notes/20250319T065051#citeproc_bib_item_1))

-   Perplexity
-   

-   First, Thank you very much for this great package! I'm (also) using perplexity. So far I successfully managed to set gptel in order to make API calls to the perplexity models. One of the nice point...
-
