Skip to content

Commit

Permalink
NodeTreeMachi: Fix subject encoding (JDimproved#1275)
Browse files Browse the repository at this point in the history
まちBBSのスレ一覧から未読スレを開くとスレタイトルが文字化けする
不具合を修正します。

以前の修正でスレタイトルのエンコーディング変換に間違いがあり
BoardMachiのエンコーディングを使うところがNodeTreeMachiが管理する
エンコーディングになっていました。

commit 93749e7

修正にあたり不具合報告をしていただきありがとうございました。
https://next2ch.net/test/read.cgi/linux/1654053581/172
  • Loading branch information
ma8ma committed Oct 15, 2023
1 parent 47c5a50 commit 9f7971c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dbtree/nodetreemachi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ char* NodeTreeMachi::process_raw_lines( std::string& rawlines )
std::string reg_subject( "<title>([^<]*)</title>" );
if( m_regex->exec( reg_subject, line, offset, icase, newline, usemigemo, wchar ) ){

m_subject_machi = MISC::Iconv( m_regex->str( 1 ), Encoding::utf8, get_encoding() );
const Encoding enc = DBTREE::board_encoding( get_url() );
m_subject_machi = MISC::Iconv( m_regex->str( 1 ), Encoding::utf8, enc );
#ifdef _DEBUG
std::cout << "NodeTreeMachi::process_raw_lines" << std::endl;
std::cout << "subject = " << m_subject_machi << std::endl;
Expand Down

0 comments on commit 9f7971c

Please sign in to comment.