diff --git a/mod/hotpot/view.php b/mod/hotpot/view.php
index 5275a678c33..aaba7e14765 100644
--- a/mod/hotpot/view.php
+++ b/mod/hotpot/view.php
@@ -426,10 +426,23 @@
break;
} // end switch $framename
break;
- default:
- // HOTPOT_NAVIGATION_BUTTONS
- // HOTPOT_NAVIGATION_GIVEUP
- // HOTPOT_NAVIGATION_NONE
+ case HOTPOT_NAVIGATION_GIVEUP:
+ // replace charset , if necessary
+ // HotPots are plain ascii (iso-8859-1) with unicode chars encoded as HTML entities
+ $charset = get_string("thischarset");
+ if ($charset == 'iso-8859-1') {
+ // do nothing
+ } else {
+ $hp->html = preg_replace(
+ '|]*charset=iso-8859-1[^>]*>|is',
+ '',
+ $hp->html
+ );
+ }
+ // no break (continue to print html to browser)
+ default:
+ // HOTPOT_NAVIGATION_BUTTONS
+ // HOTPOT_NAVIGATION_NONE
if (!empty($available_msg)) {
$hp->insert_message('', $available_msg);
}