new codec for javascript
correction of the encoder regex