non-source language info gets modified in HTML filter

Issue #25 resolved
Former user created an issue

Original [issue 25](https://code.google.com/p/okapi/issues/detail?id=25) created by @ysavourel on 2009-03-15T23:29:24.000Z:

In the following:

String snippet = "<p lang='en'>Text</p><p lang='ja'>JA text</p>"; assertEquals("<p lang='FR'>Text</p><p lang='ja'>JA text</p>", generateOutput(getEvents(snippet), snippet, "FR"));

The <p lang='ja'> also gets passed as a modifiable property and gets updated to the target language of the output.

so we get "<p lang='FR'>Text</p><p lang='FR'>JA text</p>" instead of "<p lang='FR'>Text</p><p lang='ja'>JA text</p>"

Not sure if the choice should be done at the filter level or in the encoder. but if it needs to be done in the encoder, it's going to be difficult as it does not have access to the source language.

Comments (1)

  1. Former user Account Deleted

    Comment [2.](https://code.google.com/p/okapi/issues/detail?id=25#c2) originally posted by @ysavourel on 2009-03-27T00:43:38.000Z:

    Fixed this in the GenericSkeletonWriter. the LANGUAGE property is now updated only if the current value is the same as the input language code (passed to the writer by StartDocument). The test is case- insensitive ('en' is the same as 'EN'), but (for now at least) still region- sensitive ('en' is not the same as 'en-us').

  2. Log in to comment