Bad conversion in this case
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 107
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
RTF Translation is wrong in this case:
`<?php
error_reporting(-1);
ini_set('display_errors', 'on');
require DIR . '/vendor/autoload.php';
use RtfHtmlPhp\Document;
use RtfHtmlPhp\Html\HtmlFormatter;
$original = "{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}\viewkind4\uc1\pard\lang1036\f0\fs16 m'e9lange ma'efs fran'e7ais\par}";
$document = new Document($original); // or use a string directly
$formatter = new HtmlFormatter('UTF-8');
$r = $formatter->Format($document);
file_put_contents('rtf.html', $r);
echo $r;
?>`
Result:
tf1onttbl0nilcharset0 Microsoft Sans Serif;iewkind40s16 mélange maïs français
Expected result:
Something like "Mélange maïs français"
Thanks,
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied PHP reproduction, tracing Document and HtmlFormatter as the RTF is parsed and formatted. The fix is done when the example produces the expected “Mélange maïs français” text without RTF control-word artifacts; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100