Bug 67522 - [PATCH] mail/pine4 has broken charset conversion in 4.60
Summary: [PATCH] mail/pine4 has broken charset conversion in 4.60
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-03 12:40 UTC by Oleg Sharoiko
Modified: 2004-06-09 12:42 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (637 bytes, patch)
2004-06-03 12:40 UTC, Oleg Sharoiko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sharoiko 2004-06-03 12:40:24 UTC
	Version 4.60 of Pine has a bug in conversion_table():

	unsigned short value is being assigned to unsigned char variable
	which is later compared to another unsigned short value. It's clear
	that such a comparison is almost always false as these unsigned short
	values are unicode chars from national alphabets which do not fit in
	unsigned char.

	There is also another bug:
	after the correct character in destination charset is found
	it's rather being replaced with the code of character in original
	charset. Thus the application of table created by conversion_tables
	always leaves text untouched.

	Those guys from UW shouldn't really left such a bugs in the code :(

Fix: Apply the patch:
	
How-To-Repeat: 	Install pine 4.60
	Set your console to f.e. KOI8-R
	Open mailbox with a letter in windows-1251 and see it's not recoded
	pine 4.58 had no such a problem
Comment 1 Oliver Eikemeier freebsd_committer freebsd_triage 2004-06-03 13:07:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dougb

Over to maintainer
Comment 2 Doug Barton freebsd_committer freebsd_triage 2004-06-06 04:08:16 UTC
State Changed
From-To: open->feedback


Have you discussed this problem with the Pine authors? 
I don't like to include patches in the port without 
a really good reason.
Comment 3 Oleg Sharoiko 2004-06-07 08:37:43 UTC
Hello.

I have not discussed my patch with pine developers, but
similar patch was mentioned on pine-info maling list:
http://www.washington.edu/pine/pine-info/2004.06/msg00023.html

On Sat, 5 Jun 2004, Doug Barton wrote:

DB>Synopsis: [PATCH] mail/pine4 has broken charset conversion in 4.60
DB>
DB>State-Changed-From-To: open->feedback
DB>State-Changed-By: dougb
DB>State-Changed-When: Sat Jun 5 20:08:16 PDT 2004
DB>State-Changed-Why: 
DB>
DB>Have you discussed this problem with the Pine authors?
DB>I don't like to include patches in the port without
DB>a really good reason.
DB>
DB>http://www.freebsd.org/cgi/query-pr.cgi?pr=67522
DB>

-- 
Oleg Sharoiko.
Software and Network Engineer
Computer Center of Rostov State University.
Comment 4 Doug Barton freebsd_committer freebsd_triage 2004-06-09 12:41:03 UTC
State Changed
From-To: feedback->closed


I committed the patch from the Pine web site. Thanks for 
bringing this to my attention.