File tree 1 file changed +2
-14
lines changed
1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -689,20 +689,8 @@ XML_GetCurrentColumnNumber(XML_Parser parser)
689
689
PHP_XML_API long
690
690
XML_GetCurrentByteIndex (XML_Parser parser )
691
691
{
692
- /* We have to temporarily disable the encoder to satisfy the note from the manual:
693
- * "This function returns byte index according to UTF-8 encoded text disregarding if input is in another encoding."
694
- * Although that should probably be corrected at one point? (TODO) */
695
- xmlCharEncodingHandlerPtr encoder = NULL ;
696
- xmlParserInputPtr input = parser -> parser -> input ;
697
- if (input -> buf ) {
698
- encoder = input -> buf -> encoder ;
699
- input -> buf -> encoder = NULL ;
700
- }
701
- long result = xmlByteConsumed (parser -> parser );
702
- if (encoder ) {
703
- input -> buf -> encoder = encoder ;
704
- }
705
- return result ;
692
+ return parser -> parser -> input -> consumed +
693
+ (parser -> parser -> input -> cur - parser -> parser -> input -> base );
706
694
}
707
695
708
696
PHP_XML_API int
You can’t perform that action at this time.
0 commit comments