Skip to content

Commit

Permalink
issue-687
Browse files Browse the repository at this point in the history
  • Loading branch information
mnyakushev committed Aug 21, 2024
1 parent de938b7 commit 96bd4be
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;

import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.RuntimeServices;
Expand Down Expand Up @@ -76,7 +77,7 @@ public Reader getResourceReader(String source, String encoding) throws ResourceN
InputStream inputStream = cacheInfo.getInputStream();
if ( inputStream != null )
{
return new InputStreamReader(inputStream);
return new InputStreamReader(inputStream, Charset.forName(encoding));
}
}
throw new ResourceNotFoundException( "Cannot find input stream for the entry with source=" + source );
Expand Down

0 comments on commit 96bd4be

Please sign in to comment.